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 to an end-user. An end-user can switch between check states by clicking the editor with the mouse or by pressing the SPACE key when the editor has focus. This demo illustrates the main features available to you when using the ASPxCheckBox editor.
Two or Three States
The ASPxCheckBox editor supports two or three states, depending upon the AllowGrayed property setting. To set the state programmatically, use either the Checked or CheckState property. Checked is Boolean and can identify only checked and unchecked states. The CheckState property is more powerful, and allows you to select one of three states. The third, indeterminate, state is available if the AllowGrayed property is set to true. In three-states mode, you can additionally 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
By default, a check box is represented by an image within the ASPxCheckBox editor. It is possible to assign your own images to be displayed for different check box states. Use the CheckedImage, UncheckedImage and GrayedImage properties for this purpose.
ASPxCheckBox supports native rendering by exposing the Native property. Set this property to true to render ASPxCheckBox as a native HTML INPUT element of the CHECKBOX type. This reduces the render size and improves the editor's overall performance. In a native mode, ASPxCheckBox behaves and appears as a standard HTML check box - it works in two states and it does not display check box images.
In this demo, you can switch ASPxCheckEditor's check state by both clicking the editor and pressing a button. Explore how different settings affect the editor's behavior and appearance.