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

sort by grouped columns

2 Answers 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Megan Vee
Top achievements
Rank 1
Megan Vee asked on 05 Oct 2011, 04:12 PM
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 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 11 Oct 2011, 07:22 AM
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 >>

0
Megan Vee
Top achievements
Rank 1
answered on 11 Oct 2011, 03:31 PM
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
Tags
GridView
Asked by
Megan Vee
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Megan Vee
Top achievements
Rank 1
Share this question
or