DataGridItem(Int32, Int32, ListItemType) Constructor

Definition

Initializes a new instance of the DataGridItem class.

C#
public DataGridItem (int itemIndex, int dataSetIndex, System.Web.UI.WebControls.ListItemType itemType);

Parameters

itemIndex
Int32

The index of the item from the Items collection in the DataGrid control.

dataSetIndex
Int32

The index number of the item, from the bound data source, that appears in the DataGrid control.

itemType
ListItemType

One of the ListItemType values.

Examples

The following code example demonstrates how to create and initialize a new instance of the DataGridItem class.

C#
void Page_Load(Object sender, EventArgs e)
{
   int index = 0;
   int setindex = 1;
   DataGridItem myItem = new DataGridItem(index, setindex, ListItemType.Item);
}

Remarks

Use this constructor to create and initialize a new instance of the DataGridItem class.

Applies to

Product Versies
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also