CheckedListBoxItem.CheckState Property
Gets or sets the item’s state.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(CheckState.Unchecked)]
[DXCategory("Data")]
public virtual CheckState CheckState { get; set; }
Property Value
Type | Default | Description |
---|---|---|
CheckState | Unchecked | A CheckState enumeration member specifying the item’s state. |
Remarks
Use the CheckState property to specify the item’s state. Each item displayed by the CheckedListBoxControl can have three (checked, unchecked, indeterminate) states, as shown in the image below.
The BaseCheckedListBoxControl class provides a set of methods allowing you to either obtain or specify an item’s state. For example, use the BaseCheckedListBoxControl.GetItemCheckState method to identify the item’s current state. The BaseCheckedListBoxControl.SetItemCheckState method, in turn, enables you to set the specified item into one of the three states.
Note: to set an item to the indeterminate state at runtime, end-users must hold the CTRL key.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckState property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.