[lnkForumImage]
TotalShareware - Download Free Software

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


 

Tom Krueger

1/14/2003 7:04:00 PM

Hello,

I am developing with the Mobile Information Toolkit and am wondering how to
display columns.

For instance:

TimeItem Hours
Met with client xyz 3.0
Did this 2.0


Thanks for any assistance or suggestions.

Tom






5 Answers

(dip)

1/14/2003 9:48:00 PM

0

Use the ObjectList control.

>-----Original Message-----
>Hello,
>
>I am developing with the Mobile Information Toolkit and
am wondering how to
>display columns.
>
>For instance:
>
>TimeItem Hours
>Met with client xyz 3.0
>Did this 2.0
>
>
>Thanks for any assistance or suggestions.
>
>Tom
>
>
>
>
>
>
>.
>

Tom Krueger

1/14/2003 10:16:00 PM

0

Hello,

Thanks for the post!

I have tried the ObjectList control, however, I have not been able to get it
to do what I am looking for.


The output results as:

TI 1
TI 2

You can then click on them and you get the following when clicking on TI 1:

Time Items TI 1
Hours 8.00
[back]


I am hoping to get the following:

TI 1 8.00
TI 2 12.00

Is there a configuration setting that I am missing?

Here is the code I am using.

// Load DataSet.
System.Data.DataTable table = ds.Tables.Add();
table.Columns.Add("TimeItem");
table.Columns.Add("Hours");
table.Rows.Add(new String[] {"TI 1", "8.00"});
table.Rows.Add(new String[] {"TI 2", "12.00"});

// Bind to object list (timeItems).
timeItems.DataSource = ds;
timeItems.DataBind();


// Object list code (HTML)
<mobile:ObjectList id="timeItems" runat="server"
CommandStyle-StyleReference="subcommand" LabelStyle-StyleReference="title"
AutoGenerateFields="False">

<Field Title="Time Items" Name="TimeItem" DataField="TimeItem"></Field>
<Field Title="Hours" Name="Hours" DataField="Hours"></Field>

</mobile:ObjectList>


Thanks for any help!

Tom



"dip" <bom2180@yahoo.com> wrote in message
news:496001c2bc0e$5abfd2c0$d2f82ecf@TK2MSFTNGXA09...
> Use the ObjectList control.
>
> >-----Original Message-----
> >Hello,
> >
> >I am developing with the Mobile Information Toolkit and
> am wondering how to
> >display columns.
> >
> >For instance:
> >
> >TimeItem Hours
> >Met with client xyz 3.0
> >Did this 2.0
> >
> >
> >Thanks for any assistance or suggestions.
> >
> >Tom
> >
> >
> >
> >
> >
> >
> >.
> >


(dip)

1/15/2003 1:28:00 AM

0

Hi Tom,
Set the TableFields property of the ObjectList control.

http://msdn.microsoft.com/library/de...
url=/library/en-us/mwsdk/html/mwlrftablefieldsproperty.asp

>-----Original Message-----
>Hello,
>
>Thanks for the post!
>
>I have tried the ObjectList control, however, I have not
been able to get it
>to do what I am looking for.
>
>
>The output results as:
>
>TI 1
>TI 2
>
>You can then click on them and you get the following when
clicking on TI 1:
>
>Time Items TI 1
>Hours 8.00
> [back]
>
>
>I am hoping to get the following:
>
>TI 1 8.00
>TI 2 12.00
>
>Is there a configuration setting that I am missing?
>
>Here is the code I am using.
>
>// Load DataSet.
>System.Data.DataTable table = ds.Tables.Add();
>table.Columns.Add("TimeItem");
>table.Columns.Add("Hours");
>table.Rows.Add(new String[] {"TI 1", "8.00"});
>table.Rows.Add(new String[] {"TI 2", "12.00"});
>
>// Bind to object list (timeItems).
>timeItems.DataSource = ds;
>timeItems.DataBind();
>
>
>// Object list code (HTML)
> <mobile:ObjectList id="timeItems" runat="server"
>CommandStyle-StyleReference="subcommand" LabelStyle-
StyleReference="title"
>AutoGenerateFields="False">
>
> <Field Title="Time Items" Name="TimeItem"
DataField="TimeItem"></Field>
> <Field Title="Hours" Name="Hours"
DataField="Hours"></Field>
>
></mobile:ObjectList>
>
>
>Thanks for any help!
>
>Tom
>
>
>
>"dip" <bom2180@yahoo.com> wrote in message
>news:496001c2bc0e$5abfd2c0$d2f82ecf@TK2MSFTNGXA09...
>> Use the ObjectList control.
>>
>> >-----Original Message-----
>> >Hello,
>> >
>> >I am developing with the Mobile Information Toolkit and
>> am wondering how to
>> >display columns.
>> >
>> >For instance:
>> >
>> >TimeItem Hours
>> >Met with client xyz 3.0
>> >Did this 2.0
>> >
>> >
>> >Thanks for any assistance or suggestions.
>> >
>> >Tom
>> >
>> >
>> >
>> >
>> >
>> >
>> >.
>> >
>
>
>.
>

Tom Krueger

1/15/2003 2:39:00 AM

0

Hey,

Thanks for the help, I don't think I would have found that. Havn't been
able to find it in books, and must not have searched hard enough on msdn.
Any way, so the rest of the group can benefit.

The solution to getting multiple columns on the web is to use the objectList
control. However, by default the objectList control does not put the data
in table format, it makes you click into a lower screen showing all the
details for one object. This is great at times, however, when you want to
display the data table format you must set the TableFields property of the
objectList control.

Here is the example I created:

DataSet ds = new DataSet();
System.Data.DataTable table = ds.Tables.Add();

table.Columns.Add("TimeItem");
table.Columns.Add("Hours");
table.Rows.Add(new String[] {"TI 1", "8.00"});
table.Rows.Add(new String[] {"TI 2", "12.00"});

timeItems.DataSource = ds;
timeItems.TableFields = "TimeItem;Hours";
timeItems.DataBind();

Note: when setting the TableFields don't leave unnecessary spaces for
instance a space before Hours. That will error.


As from the previous post, you can get more information and an example using
and array to load the objectList at
http://msdn.microsoft.com/library/de...url=/library/en-us/m...
mwlrftablefieldsproperty.asp


Thanks for the help, much appreciated!

Tom


"dip" <bom2180@yahoo.com> wrote in message
news:4b0001c2bc2c$f8fbce30$d2f82ecf@TK2MSFTNGXA09...
> Hi Tom,
> Set the TableFields property of the ObjectList control.
>
> http://msdn.microsoft.com/library/de...
> url=/library/en-us/mwsdk/html/mwlrftablefieldsproperty.asp
>
> >-----Original Message-----
> >Hello,
> >
> >Thanks for the post!
> >
> >I have tried the ObjectList control, however, I have not
> been able to get it
> >to do what I am looking for.
> >
> >
> >The output results as:
> >
> >TI 1
> >TI 2
> >
> >You can then click on them and you get the following when
> clicking on TI 1:
> >
> >Time Items TI 1
> >Hours 8.00
> > [back]
> >
> >
> >I am hoping to get the following:
> >
> >TI 1 8.00
> >TI 2 12.00
> >
> >Is there a configuration setting that I am missing?
> >
> >Here is the code I am using.
> >
> >// Load DataSet.
> >System.Data.DataTable table = ds.Tables.Add();
> >table.Columns.Add("TimeItem");
> >table.Columns.Add("Hours");
> >table.Rows.Add(new String[] {"TI 1", "8.00"});
> >table.Rows.Add(new String[] {"TI 2", "12.00"});
> >
> >// Bind to object list (timeItems).
> >timeItems.DataSource = ds;
> >timeItems.DataBind();
> >
> >
> >// Object list code (HTML)
> > <mobile:ObjectList id="timeItems" runat="server"
> >CommandStyle-StyleReference="subcommand" LabelStyle-
> StyleReference="title"
> >AutoGenerateFields="False">
> >
> > <Field Title="Time Items" Name="TimeItem"
> DataField="TimeItem"></Field>
> > <Field Title="Hours" Name="Hours"
> DataField="Hours"></Field>
> >
> ></mobile:ObjectList>
> >
> >
> >Thanks for any help!
> >
> >Tom
> >
> >
> >
> >"dip" <bom2180@yahoo.com> wrote in message
> >news:496001c2bc0e$5abfd2c0$d2f82ecf@TK2MSFTNGXA09...
> >> Use the ObjectList control.
> >>
> >> >-----Original Message-----
> >> >Hello,
> >> >
> >> >I am developing with the Mobile Information Toolkit and
> >> am wondering how to
> >> >display columns.
> >> >
> >> >For instance:
> >> >
> >> >TimeItem Hours
> >> >Met with client xyz 3.0
> >> >Did this 2.0
> >> >
> >> >
> >> >Thanks for any assistance or suggestions.
> >> >
> >> >Tom
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >


(Will)

1/21/2003 10:03:00 PM

0

"dip" <bom2180@yahoo.com> wrote in message news:<4b0001c2bc2c$f8fbce30$d2f82ecf@TK2MSFTNGXA09>...
> Hi Tom,
> Set the TableFields property of the ObjectList control.
>
> http://msdn.microsoft.com/library/de...
> url=/library/en-us/mwsdk/html/mwlrftablefieldsproperty.asp
>

This method will display items in columns on a "isHTML32" device.
Another way to do this is to use the DeviceSpecific Construct:
1) Drag Panel onto your form
2) Drag DeviceSpecific Control onto your panel
3) Use <ContentTemplate> to add normal HTML


<mobile:Panel id="Panel1" runat="server" Paginate=True>
<mobile:DeviceSpecific id="DeviceSpecific2" runat="server">
<Choice Filter="isHTML32"
Xmlns="http://schemas.microsoft.com/mobile/html32template...
<ContentTemplate>
<Table><TR><TD>Put your stuff in a
table></TD></TR></Table>
</ContentTemplate>
</Choice>
<Choice>
Stuff for WAP phone or i-mode phone(e.g. not in columns)
</Choice>
</mobile:DeviceSpecific>

P.S. In addition to putting straight HTML in there, you could also
put in asp controls - including asp.net controls that are not mobile
controls. You just have to make sure that you do your event handlers
correctly.