New to Telerik UI for WinForms? Download free 30-day trial

Working with ColumnChooser

Listed below are the properties which control the behavior of the columns when used with the Column Chooser:

AllowColumnChooser: This property determines whether the Column Chooser is available in the template. By default this property is set to true for all templates

Enable or Disable ColumnChooser

radGridView1.MasterTemplate.AllowColumnChooser = false;

RadGridView1.MasterTemplate.AllowColumnChooser = False

AllowHide: This property determines whether the column is allowed to be moved to the Column Chooser. By default this property is set to true for all columns

Determines if the specified column is allowed to be dragged to the column chooser dialog

radGridView1.Columns["CategoryName"].AllowHide = false;

RadGridView1.Columns("CategoryName").AllowHide = False

VisibleInColumnChooser: By setting this property for each column you determine whether the column will be visible in the Column Chooser when dragged to it. By default this property is set to true for all columns:

Determines if the specified column is going to be visible in the column chooser dialog

radGridView1.Columns["Picture"].VisibleInColumnChooser = false;

RadGridView1.Columns("Picture").VisibleInColumnChooser = False

ColumnChooserSortOrder: Gets or sets the column chooser sort order.

Accessing the column chooser instance

In order to customize the Column Chooser you can access it directly from the instance of RadGridView, as shown in the following example:

Accessing and customizing the column chooser

radGridView1.ColumnChooser.DesktopLocation = new Point(100,100);
radGridView1.ColumnChooser.Font = new Font("Segoe", 15, FontStyle.Bold);

RadGridView1.ColumnChooser.DesktopLocation = New Point(100, 100)
RadGridView1.ColumnChooser.Font = New Font("Segoe", 15, FontStyle.Bold)

Enable the filtering functionality

If the grid contains many hidden columns it is convenient to filter them so you can easily find the desired column. This is supported out of the box and can be enabled by setting the EnableFilter property to true in the ColumnChooserCreated event handler.

Enabling Filtering

private void RadGridView1_ColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
    e.ColumnChooser.EnableFilter = true;

Private Sub RadGridView1_ColumnChooserCreated(ByVal sender As Object, ByVal e As ColumnChooserCreatedEventArgs)
    e.ColumnChooser.EnableFilter = True
End Sub

See Also

In this article