TemplateField.InitializeCell 方法

定義

將文字或控制項加入至儲存格的控制項集合。

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)

參數

cell
DataControlFieldCell

DataControlFieldCell,其中包含 DataControlField 的文字或控制項。

cellType
DataControlCellType

其中一個 DataControlCellType 值。

rowState
DataControlRowState

其中一個 DataControlRowState 值,指定包含 DataControlFieldCell 之資料列的狀態。

rowIndex
Int32

資料列的索引,該資料列中包含 DataControlFieldCell

備註

當您建立使用 物件的自訂資料繫結控制項,以使用 DataControlFieldCell 資料或控制項初始化資料表結構的資料格時,請呼叫這個方法。

適用於

另請參閱