DataGridViewCheckBoxColumn Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DataGridViewCheckBoxColumn class.
Overloads
DataGridViewCheckBoxColumn() |
Initializes a new instance of the DataGridViewCheckBoxColumn class to the default state. |
DataGridViewCheckBoxColumn(Boolean) |
Initializes a new instance of the DataGridViewCheckBoxColumn and configures it to display check boxes with two or three states. |
DataGridViewCheckBoxColumn()
Initializes a new instance of the DataGridViewCheckBoxColumn class to the default state.
public:
DataGridViewCheckBoxColumn();
public DataGridViewCheckBoxColumn ();
Public Sub New ()
Remarks
Using this parameterless constructor is equivalent to supplying an argument of false
to the DataGridViewCheckBoxColumn(Boolean) constructor.
See also
Applies to
DataGridViewCheckBoxColumn(Boolean)
Initializes a new instance of the DataGridViewCheckBoxColumn and configures it to display check boxes with two or three states.
public:
DataGridViewCheckBoxColumn(bool threeState);
public DataGridViewCheckBoxColumn (bool threeState);
new System.Windows.Forms.DataGridViewCheckBoxColumn : bool -> System.Windows.Forms.DataGridViewCheckBoxColumn
Public Sub New (threeState As Boolean)
Parameters
- threeState
- Boolean
true
to display check boxes with three states; false
to display check boxes with two states.
Remarks
This constructor initializes the column by setting the following properties.
Property | Value |
---|---|
CellTemplate | A new DataGridViewCheckBoxCell with its ThreeState property initialized to the threeState parameter value. |
ThreeState | The value of the threeState parameter. |
DataGridViewColumn.SortMode | DataGridViewColumnSortMode.NotSortable |
The Alignment property of the DataGridViewCellStyle object returned by the DefaultCellStyle property. | DataGridViewContentAlignment.MiddleCenter |
The NullValue property of the DataGridViewCellStyle object returned by the DefaultCellStyle property. | CheckState.Indeterminate if threeState is true ; otherwise, false . |
See also
- DataGridView
- DataGridViewCheckBoxCell
- CellTemplate
- ThreeState
- SortMode
- DefaultCellStyle
- DataGridViewCellStyle
- Alignment
- NullValue