Check Box
- 2 minutes to read
The ASPxCheckBox control is a check editor that allows users to select yes/no or true/false conditions. Users can click the editor with a mouse or press the SPACE key when the editor has focus to switch the check state.
ASPxCheckBox offers the following features:
Three State Support
The check box’s default functionality allows users to set the editor to the checked or unchecked state. Additionally, you can enable the third grayed (indeterminate) state using the ASPxCheckBox.AllowGrayed property.
Native Rendering
ASPxCheckBox supports native rendering as a native HTML input element of the checkbox type. In native HTML mode, the control’s appearance depends on how a client browser renders native HTML elements. This reduces the render size and improves the editor’s overall performance. Set the ASPxCheckBox.Native property value to
true
to enable native rendering.Custom Images
The check box allows you to display different images (check marks) for each check box state (checked, unchecked or indeterminate).
Two Appearance Styles for iOS Theme
You can display ASPxCheckBox as a toggle switch in the iOS DevExpress theme. To enable this appearance, set the editor’s SkinID property to Switch.
Built-in Validation
The ASPxCheckBox control allows you to validate data on both the client and server sides. See the following topic to learn more: Validation.
Full-Featured Client-Side API
The ASPxClientCheckBox object is the client-side equivalent of the ASPxCheckBox control. This object exposes the control’s comprehensive client-side API.
Method Description ASPxClientCheckBox.GetChecked Returns a value indicating whether the check box editor is checked. ASPxClientCheckBox.GetCheckState Returns a value which specifies a check box checked state. ASPxClientCheckBox.GetText Returns the text displayed within the editor. ASPxClientCheckBox.SetChecked Sets a value which specifies the checked status of the check box editor. ASPxClientCheckBox.SetCheckState Sets a value specifying the state of a check box. ASPxClientCheckBox.SetText Sets the text to be displayed within the editor.