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

[Solved] Group by and Sorting issues

3 Answers 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 23 Jun 2009, 06:09 PM
I have a grid that is grouped by an OrderID column
Under this grouping are my individual ordered items (quantity, sku, price, etc...)

I would like RadGrid to sort by the first sku in the order, so that as I scroll down through the grid, the first sku in each order is sorted against the first sku in the previously listed order. 

If I turn off the grouping, everything will be ordered properly based on the dataset.  So it's definitely doing this as part of the group by function.  But then I loose my visual grouping and my Order Total (GridAggragateFunction.Sum)

Thanks.






3 Answers, 1 is accepted

Sort by
0
Carl
Top achievements
Rank 1
answered on 23 Jun 2009, 06:21 PM
Just a quick follow-up.

I think that I may be able to resolve this outside of Radgrid.  I'll follow up if I still need help. 

Thanks.
0
Carl
Top achievements
Rank 1
answered on 23 Jun 2009, 08:58 PM
Ok, the proc is now returning data exactly the way I want it, but Radgrid is definitely changing the sort order when grouped.

So the root question is can I group without radgrid resorting everything by the grouped column?
0
Nikolay Rusev
Telerik team
answered on 26 Jun 2009, 03:50 PM
Hello Carl,

If I understand you correct you are experiencing next behavior: when attempt to group, generated groups are sorted ascending. This is default behavior of RadGrid groups.

You can control by setting proper sorting direction of GridGroupByField to Ascending/Descending. You should have in mind that groups does not support natural sorting.

More information can be found on the link below:
http://www.telerik.com/help/aspnet-ajax/grdgroupbydeclarativedefinition.html

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Carl
Top achievements
Rank 1
Answers by
Carl
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or