ButtonField.InitializeCell Method

Definition

Initializes the specified DataControlFieldCell object to the specified row state.

C#
public override void InitializeCell(System.Web.UI.WebControls.DataControlFieldCell cell, System.Web.UI.WebControls.DataControlCellType cellType, System.Web.UI.WebControls.DataControlRowState rowState, int rowIndex);

Parameters

cell
DataControlFieldCell

The DataControlFieldCell to initialize.

cellType
DataControlCellType

A DataControlCellType value that indicates the type of row (header, footer, or data).

rowState
DataControlRowState

One of the DataControlRowState values.

rowIndex
Int32

The zero-based index of the row.

Remarks

The InitializeCell method creates the button type that is specified by the ButtonType property and adds it to the Controls collection of the DataControlFieldCell object. The CommandArgument property of the Button control is set to rowIndex.

Applies to

Produkt Verzie
.NET Framework 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