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

Sorting grid with Multiple pages

1 Answer 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MK
Top achievements
Rank 1
MK asked on 30 Oct 2008, 02:28 PM
Hi
My grid is getting populated with data from stored procedure which is returning me data in descending order over date. The grid gives expected data if i donot use the <sort Expression> but gives me ascending order if i do give this expression.
Another issue is if i use Allowautosort="true" in grid control it just sorts on page level not on whole data. i have 5 records per page but more then 1 page. The sorting is behaving appropriately for whole data.

please help
Thanks
Mona

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 03 Nov 2008, 11:09 AM
Hi Mona,

In case you add SortExpressions either declaratively or programmatically to your grid, you can control the sort direction applied by means of the SortOrder attribute of the respective sort expression.

Moreover, by default RadGrid will perform sorting operation over the entire set of data with paging enabled or not. You can verify that on the following online demos of the product:

http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/Sort/DefaultCS.aspx
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/Paging/DefaultCS.aspx

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
MK
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or