Skip to main content

CheckBoxProperties.ValueGrayed Property

Gets or sets the value that corresponds to the editor’s grayed state.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web


public object ValueGrayed { get; set; }

Property Value

Type Default Description
Object null

A Object value that corresponds to the grayed state of the check box editor.


Use the ValueGrayed property to specify the value that corresponds to the grayed state (the ASPxCheckBox.CheckState is set to Indeterminate) of the check box editor. This value is assigned to the editor’s ASPxEditBase.Value, when the editor is switched to the grayed state.


  • The ValueGrayed property synchronizes its value with the editor’s ASPxCheckBox.ValueGrayed property.
  • The ValueGrayed property is not in effect for the radio button.


This example illustrates how to customize ASPxCheckBox and GridViewDataCheckColumn if database data is kept in a format different from Boolean.

<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="xds"
        <dx:GridViewCommandColumn VisibleIndex="0" ShowEditButton="True"/>
        <dx:GridViewDataTextColumn FieldName="Oid" ReadOnly="True" VisibleIndex="1" SortOrder="Ascending">
        <dx:GridViewDataTextColumn FieldName="Title" VisibleIndex="2" Visible="false">
            <EditFormSettings Visible="True" />
        <dx:GridViewDataCheckColumn FieldName="Allow" VisibleIndex="3">
            <PropertiesCheckEdit AllowGrayed="true" ValueType="System.String" ValueChecked="allowed"
                ValueUnchecked="not allowed" ValueGrayed="no information" />
        <dx:GridViewDataCheckColumn FieldName="Active" VisibleIndex="4">
                <dx:ASPxCheckBox ID="chk" runat="server" AllowGrayed="true" ValueType="System.Int32"
                    ValueChecked="1" ValueUnchecked="-1" ValueGrayed="0" Value='<%# Eval("Active") %> '
            <EditFormSettings Visible="False" />
<dx:XpoDataSource ID="xds" runat="server" TypeName="MyObject">
See Also