This demo illustrates the ASPxCheckBox editor's main features. The DevExpress ASP.NET Check Box (ASPxCheckBox) is a check editor that indicates whether a particular condition is on or off. It is commonly used to present a Yes/No or True/False selection. An end-user can switch between check states by clicking the editor or pressing the SPACE key when the editor is focused.
Two or Three States
The ASPxCheckBox editor supports two or three states, depending on the AllowGrayed property setting. To set the state programmatically, use either the Checked or CheckState property. Checked is Boolean and supports only checked and unchecked states. The CheckState property allows you to select one of three states: checked, unchecked and indeterminate. Set the AllowGrayed property to true to enable the indeterminate state. In the three-state mode, you can also use the AllowGrayedByClick property to control whether end-users are allowed to switch the editor to the indeterminate state or whether this can only be done programmatically.
Custom Images for Check Box
A checkbox is an image within the ASPxCheckBox editor by default. Assigning your images to different checkbox states is also possible using the CheckedImage, UncheckedImage and GrayedImage properties.
The ASPxCheckBox supports native rendering by exposing the Native property. Set this property to true to render the ASPxCheckBox as a CHECKBOX type native HTML INPUT element. This reduces the rendering size and improves the editor's overall performance. In native mode, the ASPxCheckBox behaves like a standard HTML checkbox - two states without images.
Toggle Switch Mode
ASPxCheckBox allows transforming the checkbox's default representation into a toggle switch using the ToggleSwitchDisplayMode property.
In this demo, try to switch the ASPxCheckBox's checked state by clicking the "Switch" button. The "Gray out" button allows you to set the check box's grayed state.