Introduction to the ObjectList Control
ObjectList controls display multiple views of data collections such as databases. Each item, or object, in an object list can be thought of as a record in a database. Like database records, objects in an ObjectList control contain fields containing the data. Applications must use data binding to fill an object list with data. (If you need your application to create a list of static items, use the List control.)
In an ObjectList control, one view of the data is a summary-style tabular list of objects. The table contains a row of data for each object. The columns show field values. In another view of the data, ObjectList controls display a detailed view of each record. This view includes the values in every field that is publicly available. You can customize both of these views, either programmatically or with the ObjectList control's Property Builder dialog box.
An ObjectList control must be placed within 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. After you add an ObjectList control to a container or template, sample items are displayed until you specify the object list's data binding.
Applications can bind ObjectList controls to a DataView or dataset object, or to any other object that implements the IEnumerable interface. When an ObjectList control performs data binding, it can automatically generate the fields displayed for the list items. For more information, see Data Binding and Viewing Data Using an ObjectList Control.
The ObjectList control supports device-specific customization through property overrides and templates.
In addition, applications can attach custom commands to each object in an ObjectList control. To define commands, use the Property Builder dialog box for ObjectList controls. The designer adds <Command> elements to the page markup. At run time, when the user selects a command, the ObjectList control raises an ItemCommand event. Your application can handle the event to further customize the control's behavior.
See Also
Tasks
How to: Add and Configure an ObjectList Control
Reference
Concepts
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