How to: Add and Configure an ObjectList Control
Use an ObjectList control to display a list or table of data objects.
To add an ObjectList control to an ASP.NET mobile Web page
Drag an ObjectList control from the Mobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on a mobile Web page. You can also drag it onto a mobile user control page.
In the Properties window, select the DataSource property and use the drop-down list to choose a bindable data source.
For additional information about bindable data sources, see Using Data Binding with ASP.NET Mobile Controls.
In the Properties window, click the ellipsis button () in the Fields box.
In the ObjectList Properties dialog box, create new fields or select existing fields using the Field Name list.
Using the DataField drop-down list, bind the ObjectList field to a field in the data source.
To format the output, specify a format string in the DataFormatString box.
For more information about .NET Framework format strings, see Formatting Overview.
In the Title box, enter the title or label that the application will display for the field name
Click OK.
To apply a command to an ObjectList control
In the Properties window, click the ellipsis button in the Commands box.
In the Property Builder dialog box, click Create new command and enter a name for the new command.
In the Text box, enter the text that the application uses to render the Command control on the device's display.
Repeat steps 2 and 3 until the ObjectList control's commands are all defined.
Click OK to close the Property Builder.
In the Properties window for the ObjectList control, in the drop-down list for the DefaultCommand property, click one of the commands that you defined.
To change a field name on an ObjectList control
In the Properties window, click the ellipsis button () in the Fields box.
The designer displays the ObjectList Properties dialog box.
In the Field Name list, select the item that you want to change.
Press F2 or click the item again to make the item editable, enter the new name, and then press ENTER.
See Also
Tasks
How to: Add and Configure an ObjectList Control
Concepts
Introduction to the ObjectList Control
Overriding Properties
Data Binding and Viewing Data Using an ObjectList Control
Introduction to the Form Control
Introduction to the Panel Control
Introduction to the List Control
Using Data Binding with ASP.NET Mobile Controls