TemplateField.InitializeCell Method

Definition

Adds text or controls to a cell's controls collection.

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

A DataControlFieldCell that contains the text or controls of the DataControlField.

cellType
DataControlCellType

One of the DataControlCellType values.

rowState
DataControlRowState

One of the DataControlRowState values, specifying the state of the row that contains the DataControlFieldCell.

rowIndex
Int32

The index of the row that the DataControlFieldCell is contained in.

Remarks

Call this method when you are creating a custom data-bound control that uses DataControlFieldCell objects to initialize the cells of the table structure with data or controls.

Applies to

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