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

4 posts, 0 answers
  1. BMac
    BMac avatar
    6 posts
    Member since:
    Oct 2014

    Posted 26 Aug 2015 Link to this post

    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!

  2. Eyup
    Admin
    Eyup avatar
    3867 posts

    Posted 31 Aug 2015 Link to this post

    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
  3. BMac
    BMac avatar
    6 posts
    Member since:
    Oct 2014

    Posted 31 Aug 2015 in reply to Eyup Link to this post

    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.
  4. Eyup
    Admin
    Eyup avatar
    3867 posts

    Posted 02 Sep 2015 Link to this post

    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
Back to Top