DataGridViewCheckBoxColumn 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 DataGridViewCheckBoxColumn 類別的新執行個體。
多載
DataGridViewCheckBoxColumn() |
初始化 DataGridViewCheckBoxColumn 類別的新執行個體為預設狀態。 |
DataGridViewCheckBoxColumn(Boolean) |
初始化 DataGridViewCheckBoxColumn 的新執行個體,並設定其顯示具有兩種或三種狀態的核取方塊。 |
DataGridViewCheckBoxColumn()
初始化 DataGridViewCheckBoxColumn 類別的新執行個體為預設狀態。
public:
DataGridViewCheckBoxColumn();
public DataGridViewCheckBoxColumn ();
Public Sub New ()
備註
使用這個無參數建構函式相當於提供 的 false
引數給建 DataGridViewCheckBoxColumn(Boolean) 構函式。
另請參閱
適用於
DataGridViewCheckBoxColumn(Boolean)
初始化 DataGridViewCheckBoxColumn 的新執行個體,並設定其顯示具有兩種或三種狀態的核取方塊。
public:
DataGridViewCheckBoxColumn(bool threeState);
public DataGridViewCheckBoxColumn (bool threeState);
new System.Windows.Forms.DataGridViewCheckBoxColumn : bool -> System.Windows.Forms.DataGridViewCheckBoxColumn
Public Sub New (threeState As Boolean)
參數
- threeState
- Boolean
true
表示顯示具有三種狀態的核取方塊,false
表示顯示具有兩種狀態的核取方塊。
備註
此建構函式會藉由設定下列屬性來初始化資料行。
屬性 | 值 |
---|---|
CellTemplate | 新的 DataGridViewCheckBoxCell ,其 ThreeState 屬性已初始化為 threeState 參數值。 |
ThreeState | threeState 參數的值。 |
DataGridViewColumn.SortMode | DataGridViewColumnSortMode.NotSortable |
Alignment屬性所 DefaultCellStyle 傳回之 物件的 屬性 DataGridViewCellStyle 。 | DataGridViewContentAlignment.MiddleCenter |
NullValue屬性所 DefaultCellStyle 傳回之 物件的 屬性 DataGridViewCellStyle 。 | 如果 CheckState.Indeterminate 為 threeState ,則為 true ,否則為 false 。 |
另請參閱
- DataGridView
- DataGridViewCheckBoxCell
- CellTemplate
- ThreeState
- SortMode
- DefaultCellStyle
- DataGridViewCellStyle
- Alignment
- NullValue