Skip to main content

CheckEdit.CheckState Property

Gets or sets the editor’s check state.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DefaultValue(CheckState.Unchecked)]
[DXCategory("Appearance")]
public virtual CheckState CheckState { get; set; }

Property Value

Type Default Description
CheckState Unchecked

The check editor’s state.

Remarks

CheckEdit_AllowGrayed_ThreeStates.gif

A check editor can have two states (checked or unchecked), or three states (checked, unchecked, or indeterminate - also called the grayed state). The RepositoryItemCheckEdit.AllowGrayed property specifies if users may set a Check Editor to the indeterminate state. If you disable the RepositoryItemCheckEdit.AllowGrayed property for an editor in the indeterminate state, it continues to show as indeterminate (although the CheckState property will return the Unchecked value).

The following three properties allow you to set or determine the editor’s state:

CheckState

Checked

EditValue

Checked

true

true (or ValueChecked)

Unchecked

false

false (or ValueUnchecked)

Indeterminate

Returns true

null, Nothing (or ValueGrayed)

The default state order is “Indeterminate - Unchecked - Checked”. To alter this order and make it “Indeterminate - Checked - Unchecked”, set the DefaultStateAfterIndeterminate property to Checked.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

See Also