Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to Create a Custom Column Chooser

$
0
0

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 = view
view.ColumnChooserFactory = New CustomColumnChooser(columnChooser)

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>