Skip to main content

DxDataGridColumnBase<T>.ShowInColumnChooser Property

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

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v22.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).

<DxDataGrid Data="@Products" AllowColumnDragDrop="false">
    <HeaderTemplate>
        <DxToolbar>
            <DxDataGridColumnChooserToolbarItem Alignment="ToolbarItemAlignment.Right" />
        </DxToolbar>
    </HeaderTemplate>
    <Columns>
        <DxDataGridColumn Field="@nameof(Product.ProductName)" ShowInColumnChooser="false" />
        <DxDataGridComboBoxColumn Field="@nameof(Product.CategoryId)" Caption="Category"
                                  Data="@Categories" TextFieldName="@nameof(Category.CategoryName)" ValueFieldName="@nameof(Category.CategoryId)" />
        <DxDataGridSpinEditColumn Field="@nameof(Product.UnitPrice)" DisplayFormat="c" Width="120px" />
        <DxDataGridSpinEditColumn Field="@nameof(Product.UnitsInStock)" Width="120px" />
        <DxDataGridColumn Field="@nameof(Product.QuantityPerUnit)" />
        <DxDataGridCheckBoxColumn Field="@nameof(Product.Discontinued)" Width="120px" />
    </Columns>
</DxDataGrid>

Data Grid - A column is hidden in Column Chooser

Run Demo: Data Grid - Hide a Column from the Column Chooser

See Also