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

Custom Sort

1 Answer 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deborah
Top achievements
Rank 1
Deborah asked on 22 Apr 2011, 04:40 PM
I need to perform a custom sort that is different depending on which column the user selects for the sort.

I cannot seem to determine which column the user selected to sort within the CustomSorting event.

e.Column and e.GridViewTemplate are both deprecated.

How do I determine the column that the user selected for the sort within the CustomSorting event?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 Apr 2011, 01:13 PM
Hello Deborah,

Thank you for writing.

You can determine which column or columns are being sorted by checking the SortDescriptors that are used in RadGridView. Each SortDescriptor has a property called PropertyName that will give you the name of the column that is being used for. 

For example, if you sort Column A, the SortDescriptors collection will contain one sort descriptor and its PropertyName will be the name of Column A. If you make a complex sorting and sort Column A and then Column B, you will have two sort descriptors (one for A and one for B) in the SortDescriptors collection.

I hope the provided information addresses your question. Should you have any other questions, do not hesitate to contact us.

Kind regards,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Deborah
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or