[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

RE: ObjectList Control - Width and Font Properties

Mark Gialo

12/22/2006 2:37:00 PM

JJ and friends...after much pain and suffering, I have FINALLY found the
"magic pill" to successfully deploy the Objectlist Control using customized
tables. The key is in the careful utilization of the asp:Table, asp:TableRow,
and asp:TableCell Server Controls within the Objectlist Construct. Please
note that the asp:LinkButton raises the ItemCommand Event of the Objectlist
Control, to afford you the ability to select a specific row, and take action
on that selection.

My hope is that you all find this useful.

---------------------------------------------------------------------------------

<mobile:Form id="Form1" runat="server" Title="Course
Management">
<mobile:ObjectList id="ObjList1" runat="server"
AutoGenerateFields="false"
BreakAfter="true" Font-Size="Small" Alignment="Left"
OnItemCommand="ObjList1_ItemCommand">
<Field DataField="dt_course_name" Title="Course Name"/>
<Field DataField="dt_course_address" Title="Address" />
<Field DataField="dt_course_city" Title="City" />
<Field DataField="dt_course_state" Title="State" />
<Field DataField="dt_course_zip" Title="Zip Code" />
<Field DataField="dt_course_phone" Title="Course Phone" />
<Field DataField="dt_course_id" Title="Course Id" />
<Field DataField="dt_more" Title="Course Id" Visible=false />
<DeviceSpecific>
<Choice>
<HeaderTemplate>
<asp:Table runat="server" Width="100%" BorderWidth="1">
<asp:TableRow runat="server" BorderWidth="1">
<asp:TableCell Width="65%">Golf Course ame
</asp:TableCell>
<asp:TableCell Width="20%">Course ID</asp:TableCell>
<asp:TableCell Width="15%">State</asp:TableCell>
</asp:TableRow>
</asp:Table>
</HeaderTemplate>
<ItemTemplate>
<asp:Table runat="server" Width="100%" BorderWidth="1">
<asp:TableRow runat="server" BorderWidth="1">

<asp:TableCell VerticalAlign="Top"
Font-Size="X-Small"
Width="65%" BorderWidth="1" Wrap="true">
<asp:LinkButton Runat="server">
<%#
((ObjectListItem)Container)["dt_course_name"]%>
</asp:LinkButton>
</asp:TableCell>
<asp:TableCell VerticalAlign="Top"
Font-Size="X-Small"
Width="20%" BorderWidth="1" Wrap="true">
<asp:LinkButton ID=LinkButton1 Runat="server"
CommandName="more">
<%#
((ObjectListItem)Container)["dt_course_id"]%>
</asp:LinkButton>
</asp:TableCell>
<asp:TableCell VerticalAlign="Top"
Font-Size="X-Small"
Width="15%" BorderWidth="1" Wrap="true">
<%#
((ObjectListItem)Container)["dt_course_state"]%>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</Choice>
</DeviceSpecific>
</mobile:ObjectList>
</mobile:Form>


"Mark Gialo" wrote:

> My mobile application has three columns in an objectlist. When rendering this
> to a blackberry device, the text is wrapping signifying perhaps the font size
> or width of the control is too large.
>
> Is there any way to set a pixel size for the objeclist control? or perhaps
> another way to insure it renders properly.