Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V23.1
  • DxCheckBoxSettings.ShowCheckBoxInDisplayMode Property

    Specifies whether to display column cell values as checkboxes or text strings when the Grid is in display mode.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v23.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool ShowCheckBoxInDisplayMode { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to display cell values as checkboxes; false to display cell values as text strings.

    Remarks

    The Grid component generates and configures cell editors for individual columns based on associated data types. The component displays these cell editors in the filter row and in data rows during edit operations. If a column’s cell editor is a checkbox, the Grid also displays column cell values as checkboxes in display mode.

    Display Checkboxes in Boolean Columns

    Set the ShowCheckBoxInDisplayMode property to false to display the corresponding text strings instead of checkboxes in the Grid’s display mode. To customize these strings, specify the following properties:

    The example below demonstrates how to display text strings instead of checkboxes in the Discontinued column:

    Display Text Strings in Boolean Columns

    @inject ProductService ProductData
    
    <DxGrid Data="@products">
        <Columns>
            <DxGridDataColumn FieldName="ProductName" />
            <DxGridDataColumn FieldName="UnitPrice" />
            <DxGridDataColumn FieldName="UnitsInOrder" />
            <DxGridDataColumn FieldName="Discontinued">
                <EditSettings>
                    <DxCheckBoxSettings ShowCheckBoxInDisplayMode="false" />
                </EditSettings>
            </DxGridDataColumn>
        </Columns>
    </DxGrid>
    
    @code {
        private Product[]? products;
        protected override async Task OnInitializedAsync() {
            products = await ProductData.GetData();
        }
    }
    

    To change display mode of column cells at runtime, use the ICheckBoxSettings.ShowCheckBoxInDisplayMode property.

    See Also