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

Sorting Column Chooser

6 Answers 202 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kennith
Top achievements
Rank 1
Kennith asked on 16 Nov 2009, 09:06 PM
Is there a way to, through code, sort the column chooser?

6 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 18 Nov 2009, 01:52 PM
Hi Kennith,

Currently, there is no way to sort the items in the column chooser. However, I will add this as a feature request and we will consider it when planning our upcoming releases. Your Telerik points have been updated accordingly.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Igor
Top achievements
Rank 1
answered on 18 Nov 2011, 11:05 PM
Hi Kennith - I have an outstanding PITS ticket for this also. Please vote on it if you still need it... http://www.telerik.com/support/pits.aspx#/tracked/winforms/8386
0
Joe Sugden
Top achievements
Rank 1
answered on 31 Jul 2014, 02:17 PM
Is this available yet? I see 2 similar tickets, both marked as completed, but not sure if it's in a release.

http://feedback.telerik.com/Project/154/Feedback/Details/112146-improve-column-chooser-to-show-the-invisible-columns-sorted
http://feedback.telerik.com/Project/154/Feedback/Details/110950-sort-in-column-chooser
0
Stefan
Telerik team
answered on 01 Aug 2014, 07:31 AM
Hello Joe,

Thank you for writing.

We have introduced the sorting feature back in Q1 2012 SP1. Here is how you can set the sort order:
radGridView1.ColumnChooser.SortOrder = RadSortOrder.Ascending;
 
void radGridView1_ColumnChooserCreated(object sender, ColumnChooserCreatedEventArgs e)
{
    e.ColumnChooser.SortOrder = RadSortOrder.Ascending;
}

Using the ColumnChooserEvent is important, as the column chooser instance is recreated on demand. This ensures that you will always work with valid instance of it.

I hope this helps.

Regards,
Stefan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Ada
Top achievements
Rank 1
answered on 19 Nov 2018, 05:22 AM

Hi Stefan, I added this code:

 Private Sub TheList_ColumnChooserCreated(sender As Object, e As ColumnChooserCreatedEventArgs) Handles TheList.ColumnChooserCreated
        e.ColumnChooser.SortOrder = RadSortOrder.Ascending
    End Sub

 

But the column chooser is not ordered, still the same as no order. I tried no order, ascending, descending, but all got the same order.

Please help.

 

Thanks.

 

Ada

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Nov 2018, 01:11 PM
Hello, Ada, 

The RadGridView.ColumnChooserCreated property controls how the columns in the column chooser will be sorted. I have attached a sample project for your reference. Please refer to the attached gif file illustrating the behavior on my end with the specified version.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Kennith
Top achievements
Rank 1
Answers by
Jack
Telerik team
Igor
Top achievements
Rank 1
Joe Sugden
Top achievements
Rank 1
Stefan
Telerik team
Ada
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or