Tab
A newer version of this page is available. Switch to the current version.

ASPxCheckBox Class

The check box control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxCheckBox :
    ASPxEdit,
    ICheckBoxControl,
    IInternalCheckBoxOwner,
    IValueTypeHolder
Public Class ASPxCheckBox
    Inherits ASPxEdit
    Implements ICheckBoxControl,
               IInternalCheckBoxOwner,
               IValueTypeHolder

Related API Members

The following members accept/return ASPxCheckBox objects:

Remarks

The ASPxCheckBox class is a check editor that gives the user an option, such as true/false or yes/no.

ASPxCheckbox_control.png

The state of the check box editor can be specified using the ASPxCheckBox.Checked or ASPxCheckBox.CheckState property. Checked is Boolean and can identify only checked and unchecked states. The CheckState property is more powerful. By default, it can be set to either the checked or unchecked check state. To enable the third grayed state, set the ASPxCheckBox.AllowGrayed property to true. Check box states can be associated with any type of value which is specified by the ASPxCheckBox.ValueType property. A value representing the checked state of the ASPxCheckBox is specified via the ASPxCheckBox.ValueChecked property. The ASPxCheckBox.ValueUnchecked and ASPxCheckBox.ValueGrayed properties specify the unchecked and grayed states of the check box, respectively. These property values are assigned to the editor's ASPxEdit.Value property when the checkbox editor's state changes.

A change to the check box editor's state forces the ASPxCheckBox.CheckedChanged event to be fired.

A check box can be rendered using a standard HTML input element (if the ASPxCheckBox.Native property is set to true) or with fully supported customization of its appearance. In this case the appearance of a check box can be customized via the ASPxCheckBox.CheckBoxStyle property. If the ASPxCheckBox.EnableFocusedStyle property is set to true you can specify specific styles specifying for a focused check box via the ASPxCheckBox.CheckBoxFocusedStyle property.

The ASPxCheckBox control consists of the edit region (check mark) and the text label. The editor's text label can be defined via the ASPxCheckBox.Text property. The text label's alignment relative to the check mark is specified via the ASPxCheckBox.TextAlign property. The ASPxCheckBox.Layout property can be used to control whether the check mark and text label are displayed using a table or flow layout.

By default, a check box edit region (check mark) 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 ASPxCheckBox.CheckedImage, ASPxCheckBox.UncheckedImage and ASPxCheckBox.GrayedImage properties for this purpose.

NOTE

The client-side equivalent of this editor control is represented by the ASPxClientCheckBox object. The editor's client-side API is enabled if the ASPxEditBase.EnableClientSideAPI property is set to true, or any client event is handled. Available client events can be accessed via the ASPxCheckBox.ClientSideEvents property.

See Also