Name

DataGridItem

Synopsis

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 a 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 : Inherits TableRow : Implements System.Web.UI.INamingContainer
' Public Constructors
   Public Sub New(ByVal itemIndex As Integer, 
        ByVal dataSetIndex As Integer, 
        ByVal itemType As ListItemType) 
' Public Instance Properties
   Overridable Public Property DataItem As Object  
   Overridable Public ReadOnly Property DataSetIndex As Integer  
   Overridable Public ReadOnly Property ItemIndex As Integer  
   Overridable Public ReadOnly Property ItemType As ListItemType  
' Protected Instance Methods
   Overrides Protected Function OnBubbleEvent(
        ByVal source As Object, 
        ByVal e As EventArgs) As Boolean  
   Overridable Protected Friend Sub SetItemType(
        ByVal itemType As ListItemType) 
End Class

Hierarchy

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 ...

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.