A newer version of this page is available. Switch to the current version.

CheckedListBoxItem.CheckState Property

Gets or sets the item's state.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.2.dll

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.

CheckedListBoxControl - CheckState

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.

See Also