How to get a two column list?

S

Stacey

I am trying to develop a mobile page that has two columns. Tables are not
supported and I really don;t know what to do here. I need to display in a
pretty format (tables would be awesome.. but).. jsut some simple labels and
values.

Ideas?

Stacey
 
S

Steven Cheng[MSFT]

Hello Stacey,

Because ASP.NET Mobile device will target different kinds of client mobile
devices, it can not provide very decent and specific template as ASP.NET
template controls. For displaying table like data, you may use the List
control since it support both static items and databinding items. And for
multi-columns displaying, it may not supported by non-html compatible
device/browser, if you're sure the device can support html32 or higher, you
can define a custom template for html32 devices. e.g.


=============================
<mobile:Form id="Form1" runat="server">&nbsp;<mobile:List runat="server"
id="CitiesList" OnItemCommand="CitiesList_ItemCommand"
BreakAfter="true" Decoration="none"<DeviceSpecific>
<Choice Filter="isHTML32">
<HeaderTemplate>

<table width="100%" border="1">

</HeaderTemplate>
<ItemTemplate>

<tr>
<td>CategoryID: </td>
<td><%# Eval("CategoryID") %></td>
</tr>


</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</Choice>
</DeviceSpecific>
</mobile:List>

</mobile:Form>
========================

For more info about templating in ASP.NET mobile form, you can refer to the
MSDN reference:

http://msdn2.microsoft.com/en-us/library/system.web.ui.mobilecontrols.device
specific(VS.80).aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stacey

My specific device that I am coding for is a T-Mobile Dash (aka HTC
Excalibur).. I also have a Motorola Q. Those are the only 2 devices that I
know of. They are both running Windows Movbile 2005.
 
S

Stacey

Can you tell me how to tell as well?
Steven Cheng said:
Hello Stacey,

Because ASP.NET Mobile device will target different kinds of client mobile
devices, it can not provide very decent and specific template as ASP.NET
template controls. For displaying table like data, you may use the List
control since it support both static items and databinding items. And for
multi-columns displaying, it may not supported by non-html compatible
device/browser, if you're sure the device can support html32 or higher,
you
can define a custom template for html32 devices. e.g.


=============================
<mobile:Form id="Form1" runat="server">&nbsp;<mobile:List runat="server"
id="CitiesList" OnItemCommand="CitiesList_ItemCommand"
BreakAfter="true" Decoration="none"<DeviceSpecific>
<Choice Filter="isHTML32">
<HeaderTemplate>

<table width="100%" border="1">

</HeaderTemplate>
<ItemTemplate>

<tr>
<td>CategoryID: </td>
<td><%# Eval("CategoryID") %></td>
</tr>


</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</Choice>
</DeviceSpecific>
</mobile:List>

</mobile:Form>
========================

For more info about templating in ASP.NET mobile form, you can refer to
the
MSDN reference:

http://msdn2.microsoft.com/en-us/library/system.web.ui.mobilecontrols.device
specific(VS.80).aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no
rights.
 
S

Stacey

I found out..
foreach (string key in Request.Browser.Capabilities.Keys)

{

Response.Write("<br/>" + key + ": " + Request.Browser.Capabilities[key]);

}
 
S

Steven Cheng[MSFT]

Hi Stacey,

Yes, the Request.Browser.Capabilities property contains the client-side
browser/devices' capability info(parsed from http headers). And this is
used for both ASP.NET standard and mobile application. BTW, have you
figured out what's the supported features of your target devices? As far as
I know, windows mobile 5 support HTML 32+ and cookie, however,
client-script supported is still quite limited.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Thanks for your reply Stacey,

Since html32 is supported. I suggest try directly create a non-mobile
ASP.NET page which contains a normal html <table> (designed as two column
style you want) and visit the page in your T-mobile device to see whether
it can display well.

I'll also discuss with some other engineers to see whether there is any
further ideas on this. I'll update you as soon as I get any info.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Stacey

I have thought about that, but the page is not static. The only option i
have come up with is to write a process that every few minutes or so,
regenerates a static HTML page with the udpated data.
 
S

Steven Cheng[MSFT]

Hello Stacey,

After some further research, I've got it working with the ObjectList
control. You can define multiple Fields to display multiple columns(table
like) list. e.g.

================
<mobile:ObjectList
ID="TodaysSales"
Runat="server"
AutoGenerateFields="False"
TableFields="CategoryID;CategoryName">
<Command Name="CategoryID" Text="CategoryID" />
<Command Name="CategoryName" Text="CategoryName" />
<Field DataField="CategoryID" Name="CategoryID" Title="CategoryID"
/>
<Field DataField="CategoryName" Name="CategoryName"
Title="CategoryName" />
</mobile:ObjectList>
========================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top