asp.net.ph

DataGridItem Class

System.Web.UI.WebControls Namespace


Represents an individual item in a DataGrid control.

DataGridItem Class Members

Collapse   Constructors

Visibility Constructor Parameters
public DataGridItem ( Int32 itemIndex , Int32 dataSetIndex , ListItemType itemType )

Collapse   Properties

Visibility Name Value Type Accessibility
public DataItem Object [ Get , Set ]
public DataSetIndex Int32 [ Get ]
public ItemIndex Int32 [ Get ]
public ItemType ListItemType [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
protected OnBubbleEvent ( Object source , EventArgs e ) Boolean

Remarks

A DataGridItem represents a single item or row in the DataGrid control.

The DataGrid control stores its contents in basically two collections. These collections are exposed via the DataGrid.Controls and DataGrid.Items properties. Both properties return a collection of DataGridItem objects that represent the individual items in the DataGrid, though the contents of the collections differ slightly.

DataGrid.Controls returns a ControlCollection object that contains every item in the DataGrid that is treated as a control, including the header and footer, while DataGrid.Items returns a DataGridItemCollection that contains only the data-bound items in the control.

For example, in a DataGrid bound to a data source with three records, DataGrid.Controls will return a collection consisting of five DataGridItem objects: one each for the header and footer, and one for each record ( or row of data ) in the data source. DataGrid.Items on the other hand will return a collection consisting of three DataGridItem objects, each corresponding to a record ( or row of data ) in the data source.

You can use the DataGridItem object to gain access to the properties of each item or control in the DataGrid, 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.

See Also

DataGrid.Controls   DataGrid.Items 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