asp.net.ph

DataListItem.DataItem Property

System.Web.UI.WebControls Namespace   DataListItem Class


Sets or retrieves the data item associated with the DataListItem.

Syntax


Script DataListItem.DataItem [ = var ]

Property Value


var Object representing a data item in a DataList control.

The property is read/write with no default value.

Remarks

Use the DataItem property to specify or determine the properties of a data item associated with the DataListItem object in the DataList control.

DataItem is mainly used to bind a field from the data source to a control on the DataListItem.

For any of the templated list controls, such as DataList, DataGrid, or Repeater, this property provides the object reference against which a databinding expression is evaluated, and should always be set to Container.DataItem. DataItem provides the navigation path from the container to the property value to be placed in the bound control.

NOTE: This property only applies to data items in the DataList control. The ItemType property must be set to ListItemType.Item, ListItemType.AlternatingItem, ListItemType.SelectedItem, or ListItemType.EditItem.

See Also

DataListItem Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph