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

Sorting should work but doesn't

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
improwise
Top achievements
Rank 1
Iron
Iron
improwise asked on 29 Dec 2010, 11:33 PM
We have a very strange problem, with sorting not working in  RadGrid. The problem is, it should work!

We have two very similar web applications, both set up in the same way getting data via an Object Data Source (an Extended Object Data Source to be exact). In one of the application, setting the AllowSorting=true works perfectly fine without any problems at all, in the other application, it seem to work, even the RadGrid itself seem to think it is working (processing, taking some time, showing the loading panel etc. etc. etc.) but it doesn't! The order or the rows never change. Everything else like filtering, even custom filtering, works 100%. Sorting expressions etc are in both applications generated by the RadGrid itself from the Data Source, and should be correct.

We have done exactly as described here:
http://www.telerik.com/help/aspnet-ajax/grdbasicsorting.html

If nothing had happended, that would have been one thing, but now it seems like the RadGrid is actually doing some kind of sorting, just that we never get to see the results. We really need some ideas here on what could be wrong, because as we see it, the way we are doing it should be correct, and it works fine in one application, but not the other.

Please advice :)

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 30 Dec 2010, 04:29 PM
Hello Patrik,

Sorry to hear about the problem with RadGrid. From the description you provided it seems that the sorting expressions are not applied to the datasource. There are a couple of things you can try to make sure the sorting expressions are constructed correctly and passed to the data source:
1. check whether all sorting expressions for the columns are set correctly
2. check whether all the sorting expressions (RadGrid1.MasterTableView.SortExpressions) are constructed correctly and passed to the data source (you can do this in the PreRender event (or the NeedDatasource event if you use it for binding))
3. check whether setting MasterTableView's OverrideDataSourceControlSorting property to true makes any difference

Additionally if the problem persists I will appreciate a code sample or runnable project demonstrating the issue so that we can check it on our end and provide better assistance.

All the best,
Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
improwise
Top achievements
Rank 1
Iron
Iron
Answers by
Marin
Telerik team
Share this question
or