DxDataGridColumnBase<T>.ShowInColumnChooser Property

Specifies whether a column should be displayed in the Column Chooser.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public bool ShowInColumnChooser { get; set; }

Property Value

Type Default Description
Boolean

Data columns - true;

command and selection columns - false.

true, to display a column in the Column Chooser; otherwise, false.

Remarks

The Column Chooser window displays a list of ungrouped data column headers (visible and hidden). Command and selection columns are not shown in the Column Chooser. To change a default behavior and specify whether a column should be displayed in the Column Chooser window, use the ShowInColumnChooser property.

The code below hides the Product Name data column from the Column Chooser (this column’s ShowInColumnChooser property is set to false), but displays the command column in the window (this column’s ShowInColumnChooser property is set to true).

<DxDataGrid Data="@DataSource" AllowColumnDragDrop="false">
    <HeaderTemplate>
        <DxToolbar>
            <DxDataGridColumnChooserToolbarItem />
        </DxToolbar>
    </HeaderTemplate>
    <Columns>
        <DxDataGridColumn Field="@nameof(ProductFlat.ProductName)" ShowInColumnChooser="false" />
        <DxDataGridColumn Field="@nameof(ProductFlat.Category)" />
        <DxDataGridColumn Field="@nameof(ProductFlat.Subcategory)" />
        <DxDataGridColumn Field="@nameof(ProductFlat.Availability)" />
        <DxDataGridCommandColumn ShowInColumnChooser="true" />
    </Columns>
</DxDataGrid>

Data Grid - A column is hidden in Column Chooser

See Also