ASPxCheckBox.CheckState Property
Gets or sets a value that specifies a check box check state.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.2.dll
Declaration
[DefaultValue(CheckState.Indeterminate)]
public virtual CheckState CheckState { get; set; }
Property Value
Type | Default | Description |
---|---|---|
CheckState | **Indeterminate** | One of the CheckState enumeration values. |
Available values:
Name | Description |
---|---|
Checked | An element is in a checked state (). |
Unchecked | An element is in an unchecked state (). |
Indeterminate | An element is in a grayed state (). |
Remarks
Use the CheckState property to specify a check box check state. By default, a check box can be set to either the checked or unchecked check state. To enable the third grayed state, set the ASPxCheckBox.AllowGrayed property to true.
To get or set the CheckState property value on the client side, use the ASPxClientCheckBox.GetCheckState and ASPxClientCheckBox.SetCheckState methods respectively.
You can specify an image and a value for a particular check box state using members listed in the table below.
State | The CheckState property value | Check Box Value | Check Box Image |
---|---|---|---|
Checked | CheckState.Checked | ASPxCheckBox.ValueChecked | ASPxCheckBox.CheckedImage |
Grayed | CheckState.Indeterminate | ASPxCheckBox.ValueGrayed | ASPxCheckBox.GrayedImage |
Unchecked | CheckState.Unchecked | ASPxCheckBox.ValueUnchecked | ASPxCheckBox.UncheckedImage |
Note that the CheckState and ASPxCheckBox.Checked properties synchronize their values. The image below demonstrates the correspondence between property values.