System.Web.UI.WebControls.ButtonField.InitializeCell Method

Initializes the specified System.Web.UI.WebControls.DataControlFieldCell object to the specified row state.

Syntax

public override void InitializeCell (DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)

Parameters

cell
The System.Web.UI.WebControls.DataControlFieldCell to initialize.
cellType
A System.Web.UI.WebControls.DataControlCellType value that indicates the type of row (header, footer, or data).
rowState
One of the System.Web.UI.WebControls.DataControlRowState values.
rowIndex
The zero-based index of the row.

Remarks

The ButtonField.InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, int) method creates the button type that is specified by the ButtonFieldBase.ButtonType property and adds it to the System.Web.UI.Control.Controls collection of the System.Web.UI.WebControls.DataControlFieldCell object. The Button.CommandArgument property of the System.Web.UI.WebControls.Button control is set to rowIndex.

Requirements

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