| ||||||||||||||||||||||||||
DataListItem ClassSystem.Web.UI.WebControls Namespace Represents an individual item in a DataList control.
|
||||||||||||||||||||||||||
| Visibility | Name | Parameters | Return Type |
|---|---|---|---|
| protected | CreateControlStyle | ( ) | Style |
| protected | OnBubbleEvent | ( Object source , EventArgs e ) | Boolean |
| public | RenderItem | ( HtmlTextWriter writer , Boolean extractRows , Boolean tableLayout ) | Void |
The DataList control stores its contents in basically two collections. These collections are exposed via the DataList.Controls and DataList.Items properties. Both properties return a collection of DataListItem objects that represent the individual items in the DataList, though the contents of the collections differ slightly.
DataList.Controls returns a ControlCollection object that contains every item in the DataList that is treated as a control, including the header and footer, while DataList.Items returns a DataListItemCollection that contains only the data-bound items in the control.
For example, in a DataList bound to a data source with three records, DataList.Controls will return a collection consisting of five DataListItem objects: one each for the header and footer, and one for each record ( or row of data ) in the data source. DataList.Items on the other hand will return a collection consisting of three DataListItem objects, each corresponding to a record ( or row of data ) in the data source.
You can use the DataListItem object to gain access to the properties of each item or control in the DataList, as well as the properties of the child controls associated with each item or control.
For examples illustrating use of this control, see the individual member types of this class.
DataList.Controls DataList.Items
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme