| |||||||||||
DataGrid.Items PropertySystem.Web.UI.WebControls Namespace DataGrid Class Returns the collection of DataGridItem objects in a DataGrid. Syntax
Property Value
The property is read only with no default value. RemarksThe Items collection provides a way to programmatically obtain information about each data-bound item in a DataGrid control. When a DataSource is bound to a DataGrid, the Items collection is populated with one DataGridItem object for each record ( or row of data ) in the data source. The Items collection is then referenced at run time by the data-bound controls defined in the ItemTemplate and AlternatingItemTemplate, to render each item in the collection.
The Items collection does not provide any methods to add or remove items to the collection. However, you can control the contents of an item by providing a handler for the ItemCreated event. ExampleThe following example show how to programmatically access the Items collection to retrieve and display the Text of the DataBoundLiteralControl associated with each item in a DataGrid control.
See AlsoDataGrid Members DataGridItem ItemIndex ItemType |
| ||||||||||
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