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

[Solved] Using paging, but full dataset retrieved from server on each call

2 Answers 121 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.
Hodgson
Top achievements
Rank 1
Hodgson asked on 23 May 2011, 10:13 PM
I have set up my grid, with paging, and all is working well. I am using MS SQL Server for a database server. Using profiling, I can see that the complete dataset is pulled from the server on each request. I suppose the paging is being done on the web server in my client code.

I would like to set up paging so that only <pageSize> ( i.e.
.Pageable(page=>page.PageSize(50)
) fifty rows in this case ) rows are pulled from the underlying data source for each data request.

I have been searching around, but how to do this is eluding me.

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 24 May 2011, 07:30 AM
Hi Hodgson,

How do you retrieve the records from the database? The grid will page on the database only if you provide an IQueryable from a data access library which supports LINQ expressions. Such libraries are Entity Framework, Linq To Sql, NHibernate and Telerik's own OpenAccess.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hodgson
Top achievements
Rank 1
answered on 24 May 2011, 02:22 PM
I'm using NHibernate 3.0, ICriteria api. I will re-work my database call to return an IQueryable object. When I have one, how do I give it to the grid?

Edit

Nice, by simply giving the grid an IQueryable object instead of an IEnumerable object, everything is done for me.
Tags
Grid
Asked by
Hodgson
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Hodgson
Top achievements
Rank 1
Share this question
or