System.Web.UI.WebControls.GridView.CreateRow Method

Creates a row in the System.Web.UI.WebControls.GridView control.

Syntax

protected virtual GridViewRow CreateRow (int rowIndex, int dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState)

Parameters

rowIndex
The index of the row to create.
dataSourceIndex
The index of the data source item to bind to the row.
rowType
One of the System.Web.UI.WebControls.DataControlRowType values.
rowState
One of the System.Web.UI.WebControls.DataControlRowState values.

Returns

A System.Web.UI.WebControls.GridViewRow created using the specified parameters.

Remarks

The GridView.CreateRow(int, int, DataControlRowType, DataControlRowState) method is used to create a row in the System.Web.UI.WebControls.GridView control.

Note:

This method is used primarily by control developers to extend the System.Web.UI.WebControls.GridView control. A data-bound System.Web.UI.WebControls.GridView control automatically generates the rows needed to display the target data.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0