Share via


ButtonField.InitializeCell 方法

定義

初始化指定的 DataControlFieldCell 物件為指定的資料列狀態。

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

cellType
DataControlCellType

DataControlCellType 值,表示資料列 (標頭、頁尾或資料) 的型別。

rowState
DataControlRowState

其中一個 DataControlRowState 值。

rowIndex
Int32

資料列之以零起始的索引。

備註

方法 InitializeCell 會建立 屬性所 ButtonType 指定的按鈕類型,並將它新增至 Controls 物件的集合 DataControlFieldCell 。 控制項 CommandArgumentButton 屬性設定為 rowIndex

適用於

另請參閱