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

How to change a group sort to the same as the column sort

3 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BMac
Top achievements
Rank 1
BMac asked on 26 Aug 2015, 04:33 PM

I have a grid with Supplier, Month, Cost that shows the past 12 months. In order to sort the months chronologically, I have SortExpression="Year, Mth" for the Month column, which are the numeric values in the query which are not displayed in the grid. This sorts correctly when the Month column header is clicked, but when I drag the Month column to the group bar, it sorts the months alphabetically. How can I get this to sort by Year, Mth when a user groups by the Month column? It seems this should be doable in the RadGrid's GroupsChanging event, but I'm not sure how to make that happen.

 

Thanks!

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 31 Aug 2015, 12:52 PM
Hi,

I've already replied to your ticket with ID: 966012.
I suggest that we continue our conversation on the mentioned thread.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
BMac
Top achievements
Rank 1
answered on 31 Aug 2015, 01:05 PM
I replied to the ticket before you posted here. You did not understand the problem. My problem is how to maintain the correct sort on the Month column when a user changes the grouping. When the grid first loads, the sort is correct. It is when the grouping changes that it no longer sorts correctly. I couldn't figure out how to maintain the Year, Mth sort on a group change. Please see attached screen shot.
0
Eyup
Telerik team
answered on 02 Sep 2015, 11:31 AM
Hello,

I've provided another sample in the mentioned thread demonstrating how you can use the GroupsChanging event handler. Please examine the RadGrid web site and let me know how it goes in the ticket.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
BMac
Top achievements
Rank 1
Answers by
Eyup
Telerik team
BMac
Top achievements
Rank 1
Share this question
or