wpf-devexpress-dot-xpf-dot-grid-dot-basecolumn-89488866.md
Gets or sets whether to display a column or a band in the Column/Band Chooser. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool ShowInColumnChooser { get; set; }
Public Property ShowInColumnChooser As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to display the band or the column header within the Column/Band Chooser; otherwise, false.
|
To hide a band or a column from the Column/Band Chooser, set its ShowInColumnChooser property to false.
<dxg:GridControl x:Name="grid" AutoGenerateColumns="AddNew" ItemsSource="{Binding Items}">
<dxg:GridControl.Bands>
<dxg:GridControlBand Name="b1" Header="Employee Name" ShowInColumnChooser="True">
<dxg:GridColumn FieldName="Id" ShowInColumnChooser="False"/>
<dxg:GridColumn FieldName="Name" ShowInColumnChooser="True"/>
</dxg:GridControlBand>
<dxg:GridControlBand Name="b2" Header="Employee Job Info" ShowInColumnChooser="True">
<dxg:GridColumn FieldName="Position" />
<dxg:GridColumn FieldName="Status" />
<dxg:GridColumn FieldName="Department" />
</dxg:GridControlBand>
<dxg:GridControlBand Name="b3" Header="Employee Contacts" ShowInColumnChooser="False">
<dxg:GridColumn FieldName="Phone" />
</dxg:GridControlBand>
</dxg:GridControl.Bands>
</dxg:GridControl>
If you want to hide a band or a column from the View, set the BaseColumn.Visible property to false in the GridControlBand.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowInColumnChooser property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-data-grid-bind-to-custom-service-with-restrictions/CS/MainWindow.xaml#L16
<dxg:GridControl.Columns>
<dxg:GridColumn x:Name="hotColumn" FieldName="Hot" Visible="False" ShowInColumnChooser="False" AllowSorting="True" AllowedSortOrders="Descending" SortOrder="Descending" />
<dxg:GridColumn x:Name="weekColumn" FieldName="Week" Visible="False" ShowInColumnChooser="False" AllowSorting="True" AllowedSortOrders="Descending" />
wpf-data-grid-change-background-color-for-modified-cells/CS/HighlightChangedCellBehavior.cs#L70
unboundColumn.Visible = false;
unboundColumn.ShowInColumnChooser = false;
AssociatedObject.Columns.Add(unboundColumn);
wpf-data-grid-change-background-color-for-modified-cells/VB/HighlightChangedCellBehavior.vb#L94
unboundColumn.Visible = False
unboundColumn.ShowInColumnChooser = False
Me.AssociatedObject.Columns.Add(unboundColumn)
See Also