Telerik Rad Grid Sorting
I have a rad grid which fetches the data from database and displays required number of records even though there are number of records eg: if there are 10,000 records which comes under search criteria. But we are retriving only the records equals to page size. ie., if paze size is 10 then 10 records will be retrived even though there are 10,000. This is done to overcome performance issues while loading millions of records.
Now the problem is if user clicks on grid column to sort only 10 records are getting 开发者_运维技巧sorted. But i need all the records in a sorted order then required records get displayed in the page.
Two possibilities pop up in my mind:
- If you use LINQ or Entity Framework, the telerik grid will perform the paging on the database server and only the items on the current page will be loaded. See demo here.
- Use manual custom paging or binding to ObjectDataSource as in this sample.
精彩评论