Column Chooser
The Column Chooser allows users to hide and show headers of columns and bands. To display the Column Chooser, a user should click Show Column/Band chooser in the column’s header context menu:
The table below lists the main properties affecting element behavior and appearance.
Characteristics | Members |
---|---|
Column Chooser Control | ExtendedColumnChooserControl |
Show and Hide | DataViewBase.ShowColumnChooser, DataViewBase.HideColumnChooser, DataViewBase.IsColumnChooserVisible |
Template | DataViewBase.ExtendedColumnChooserTemplate |
Column Header Template | DataViewBase.ColumnHeaderTemplate |
The GridControl displays the Column Chooser in a separate window. To add the Column Chooser to the same window as the GridControl, create an ExtendedColumnChooserControl object:
Users can open the Column Chooser window from a column header’s context menu. To prevent this, remove the Show Column Chooser button from the menu:
<Window xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" ...> <dxg:TableView x:Name="view" > <dxg:TableView.ColumnMenuCustomizations> <dxb:RemoveAction ElementName="{x:Static dxg:DefaultColumnMenuItemNames.ColumnChooser}"/> </dxg:TableView.ColumnMenuCustomizations> </dxg:TableView>
Add a Column Chooser to the window:
<dxg:ExtendedColumnChooserControl Owner="{Binding ElementName=view}" FlowDirection="{Binding Owner.FlowDirection, RelativeSource={RelativeSource Self}}"/>