This example shows how to create a custom standalone Column Chooser and display it within the Expander control.
For this, we implemented a custom CustomColumnChooserControl control that can be placed on a form. For example:
[XAML]<Grid><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinitionWidth="170"/></Grid.ColumnDefinitions><dxg:GridControlx:Name="grid"><dxg:GridControl.View><dxg:TableViewx:Name="tableView"/></dxg:GridControl.View></dxg:GridControl><local:CustomColumnChooserControlx:Name="columnChooser"Grid.Column="1"/></Grid>
To associate it with a grid, set the CustomColumnChooserControl's View property to the grid's View object and set the DataViewBase.ColumnChooserFactory property in the following manner:
<para><code lang="cs">columnChooser.View = viewview.ColumnChooserFactory = New CustomColumnChooser(columnChooser)