Main Page

  Previous Section Next Section


System.Web.UI.WebControls (system.web.dll)class

This class represents an individual item in the DataGrid control. You can access a DataGridItem through the DataGrid.Items collection or from a DataGrid event handler.

The DataGridItem class inherits most of its properties from System.Web.UI.Control. In addition, it provides an ItemIndex that gives its index in the DataGrid.Items collection, an ItemType property that identifies what type of item this is (a header, footer, alternating row, etc.), and a DataItem property that returns the corresponding data item (such as a System.Data.DataRowView instance).

public class DataGridItem : TableRow, System.Web.UI.INamingContainer {
// Public Constructors
   public DataGridItem(int itemIndex, int dataSetIndex, ListItemType itemType);
// Public Instance Properties
   public virtual object DataItem{set; get; }
   public virtual int DataSetIndex{get; }
   public virtual int ItemIndex{get; }
   public virtual ListItemType ItemType{get; }
// Protected Instance Methods
   protected override bool OnBubbleEvent(object source, EventArgs e); // overrides System.Web.UI.Control
   protected internal virtual void SetItemType(ListItemType itemType);


System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) WebControl(System.Web.UI.IAttributeAccessor) TableRow DataGridItem(System.Web.UI.INamingContainer)

Returned By

DataGrid.{CreateItem( ), SelectedItem}, DataGridCommandEventArgs.Item, DataGridItemCollection.this, DataGridItemEventArgs.Item

Passed To

DataGrid.{InitializeItem( ), InitializePager( )}, DataGridCommandEventArgs.DataGridCommandEventArgs( ), DataGridItemEventArgs.DataGridItemEventArgs( )

      Previous Section Next Section