sort by grouped columns

3 posts, 0 answers
  1. Megan Vee
    Megan Vee avatar
    40 posts
    Member since:
    Mar 2010

    Posted 05 Oct 2011 Link to this post

    I would like to sort my grouped columns by any value in the grouped columns.
    Similar to this post: http://www.telerik.com/community/forums/silverlight/gridview/how-do-i-group-a-field-in-radgridview-and-then-sort-the-grouped-record-with-frequency-least-to-most.aspx but then I would want to sort by the country or the total customers (or, let's say there was a continent column, then I'd want to be able to sort by that too)
    this post: http://www.telerik.com/community/forums/silverlight/gridview/aggregate-function-and-sorting.aspx
    doesn't do what I am looking for.

    Does anybody have a working example or pointers?
    TIA.
    -Megan

  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 11 Oct 2011 Link to this post

    Hello Megan Vee,

    Unfortunately such scenario is not supported by RadGridView. You could sort groups either by key or by an aggregate function (but not by a couple (or more) aggregate functions) as shown in the referenced example. Generally any change to group descriptor will invoke re-group of all items, so if you add aggregate and change GroupSortExpression everything should work. Of course there is another option to create custom aggregate function.
    Let me know if there is something unclear.

    All the best,
    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Megan Vee
    Megan Vee avatar
    40 posts
    Member since:
    Mar 2010

    Posted 11 Oct 2011 Link to this post

    Actually, this ended up working with a bit more customization:
    http://www.telerik.com/community/forums/silverlight/gridview/about-reorder-by-sumfunction-value.aspx

    Thanks, Megan
Back to Top