This sample demonstrates how to use a plug-in utility called Field Chooser, which will help you customize the view of a grid based on column visibility.
Features
The GridDataBoundFieldChooser class of a GridDataBoundGrid has been implemented to add or remove columns from a grid. This implementation is simple, which is performed by declaring the class where the constructor takes a parameter as a GridDataBoundGrid object.
Right click on a column header and select the Field Chooser menu item to view the Field Chooser dialog.
This dialog will list all the column names with check boxes adjacent to them.
The columns visible in the grid will be checked; un-checking a box makes a column disappear.
Below is an image of the Field Chooser dialog.
Here is a code snippet used to implement the class of the Field Chooser:
GridDataBoundFieldChooser fChooser = new GridDataBoundFieldChooser();
fChooser.WireGrid(this.GridDataBoundGrid1);
Here is a code snippet used to UnWire the Field Chooser:
fChooser.UnWireGrid();