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
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기