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

[Solved] Ajax bound Grid and paging issue

1 Answer 131 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shreejit
Top achievements
Rank 1
Shreejit asked on 23 Feb 2011, 04:41 PM

Hi,

I have a Ajax bound Telerik MVC grid with paging enabled (50 records per page). The data source for the grid is a database table (LINQ to SQL) which has some 5000 records.
The problem I'm facing is that on loading the grid entire 5000 records are fetched at once and on sub sequent click on different pages all these records are fetched again.

Please provide some solution on how to avoid fetching all the records at once and on subsequent paging. The solution should also take care of maintaining the sorting while moving across pages.

Any help would be appreciated.

Thanks
Shreejit

1 Answer, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 23 Dec 2011, 09:46 PM
Try adding and setting 'GridOperationMode' to Client.  Grid will load only once and do all paging and sorting with the loaded data. Page size is large, but its all client side so is still fairly fast.

.DataBinding(databinding => databinding.Ajax()
                .Select("_PropertiesResults", "Administration")
                .OperationMode(GridOperationMode.Client))
Tags
Grid
Asked by
Shreejit
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Share this question
or