This project is read-only.

large data, paging

Feb 26, 2014 at 7:46 AM
I am using Grid.MVC
my model will returns more that 18,000 records. due to which my process is slow.
When ever i hit paging it will call all my db records. Is their any mechanism to fast my process
Mar 1, 2014 at 6:17 AM

Grid.Mvc uses IQueryable<T> interface to construct query expressions to your data collection.
When you go to some page the grid invokes .Skip(N).Take(N) methods and when you sort data the grid invokes OrderBy or OrderByDescending methods etc.
If you pass IQueryable collection produced by ORM (like Entity Framework), in this case the ORM will generate query to database. In this case Grid.Mvc queries only one page of data, that currently displayed.

Ensure that you pass IQueryable<T> collection to the grid
Mar 3, 2014 at 10:38 PM
thanks for your replay by any chance do you have sample code to look in...
Mar 17, 2014 at 2:46 PM
Hi there is there any sample of code that demonstrates the usage of paging that way ?
I am also in the same situation- a big collection needed paging and not working
Mar 22, 2014 at 11:23 AM
Hi, please see source repository sample -