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
[DefaultValue(true)]
[Parameter]
public bool ShowCheckBoxInDisplayMode { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
#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.
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:
@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.