This is a migrated thread and some comments may be shown as answers.

Header Context Menu sorting column selection list

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Cowan
Top achievements
Rank 1
David Cowan asked on 08 May 2012, 03:31 PM
I'm trying to sort the column selection list in the header context menu.  I am generating GridBoundColumns programatically.  I am using

grid.MasterTableView.Columns.Add  to add my columns in sorted order and that doesn't appear to affect the column chooser flyout.  Is there a way to sort the column chooser list or to control the order externally?


1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 11 May 2012, 11:27 AM
Hello David,

The order of columns follows the order of columns in the MasterTableView, so to have the menu automatically pick up a sorted order, you should add the columns in a sorted order to the master table.

Alternatively, you could replace the menu items corresponding to the columns with custom ones. You can see how custom items can be added to the HeaderContextMenu here:
http://www.telerik.com/help/aspnet-ajax/grid-header-context-menu.html

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
David Cowan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or