Can I sort the Grid after binding? For example: I have the Datasource with 50 rows and bind it to Grid (10 rows per page). After binding, I want to sort on specific field and only on the specific page of the Grid, can I do that?
Thanks a lot
Dan
2 Answers, 1 is accepted
0
Accepted
Marin
Telerik team
answered on 22 Dec 2010, 02:44 PM
Hi Dan,
The grid normally sorts using all the items in the datasource and applies the sort expression to all of them. Sorting only for specific page is not standard scenario and is not supported by RadGrid.
If you need to apply yours, specific sorting functionality you can use the Custom Sorting for the grid but this way you will need to handle the sorting operations manually and provide specific logic that sorts only this part of the items that is on the current page.
Another option is to implement custom paging for the grid and bind it to specific amount of items, e.g. as the PageSize is. Thus upon sorting, only the items on the current page will be sorted.