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

Sorting grid when data set paged in stored procedure

2 Answers 236 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Feb 2010, 04:07 PM
Good afternoon.  I have a grid where the datasource for the grid is a data set/collection, populated via a stored procedure call via server-side code.  Paging of the data set is being done within the stored procedure, so that only data for the currently-viewed page is returned from the database.  When I click on a header column, only the current page is sorted, because of the aforementioned set-up.  Is there a way to have the entire grid/data set (not just the current page) sorted and then return to the page that I was viewing (although the contents would have changed, not just the order)?  Any help is greatly appreciated.  Thank you.

Best regards,

Chris

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 23 Feb 2010, 04:59 PM
Since all of the paging/sorting/filtering etc. is done at the database level I believe the best thing for you to do in this case would be to look into Custom Paging. I think for the functionality that you're looking for to occur you would have to load the entire data set and then perform your own logic for paging/sorting, then apply this as the data source of the RadGrid.
0
Chris
Top achievements
Rank 1
answered on 02 Mar 2010, 08:52 AM
Thanks, Schlurk.  I'll take a look.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Share this question
or