Back to Devexpress

ASPxCheckBox.CheckState Property

aspnet-devexpress-dot-web-dot-aspxcheckbox-dc72908e.md

latest3.6 KB
Original Source

ASPxCheckBox.CheckState Property

Gets or sets a value that specifies a check box check state.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(CheckState.Indeterminate)]
public virtual CheckState CheckState { get; set; }
vb
<DefaultValue(CheckState.Indeterminate)>
Public Overridable Property CheckState As CheckState

Property Value

TypeDefaultDescription
CheckStateIndeterminate

One of the CheckState enumeration values.

|

Available values:

NameDescription
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.

StateThe CheckState property valueCheck Box ValueCheck Box Image
CheckedCheckState.CheckedASPxCheckBox.ValueCheckedASPxCheckBox.CheckedImage
GrayedCheckState.IndeterminateASPxCheckBox.ValueGrayedASPxCheckBox.GrayedImage
UncheckedCheckState.UncheckedASPxCheckBox.ValueUncheckedASPxCheckBox.UncheckedImage

Note that the CheckState and ASPxCheckBox.Checked properties synchronize their values. The image below demonstrates the correspondence between property values.

See Also

AllowGrayed

Checked

GetCheckState

SetCheckState(checkState)

Check Box

ASPxCheckBox Class

ASPxCheckBox Members

DevExpress.Web Namespace