Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxCheckBoxSettings.ShowCheckBoxInDisplayMode Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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

Grid and TreeList components generate and configure cell editors for individual columns based on associated data types. Components display these cell editors in the filter row and in data rows during edit operations. If a column’s cell editor is a checkbox, the component 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 component’s display mode. To customize these strings, specify the following properties:

The following code snippet displays 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