編輯

共用方式為


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);
public override void InitializeCell (System.Web.UI.WebControls.DataControlFieldCell cell, System.Web.UI.WebControls.DataControlCellType cellType, System.Web.UI.WebControls.DataControlRowState rowState, int rowIndex);
override this.InitializeCell : System.Web.UI.WebControls.DataControlFieldCell * System.Web.UI.WebControls.DataControlCellType * System.Web.UI.WebControls.DataControlRowState * int -> unit
Public Overrides Sub InitializeCell (cell As DataControlFieldCell, cellType As DataControlCellType, rowState As DataControlRowState, rowIndex As Integer)

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

See also