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

Possible to page the grid without knowing the count

0 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joakim
Top achievements
Rank 1
Joakim asked on 09 Apr 2012, 10:04 AM
You don't want to get the count of rows from the database if you dont have to. My question is if it's possible to do the paging without this count in the Kendo grid?

I deviced a system for this in my own grid. It worked by the grid asking to fetch page 1 and 20 rows. You would then ask the database for 21 rows. If you got 21 rows you know you have at least another page. When the user clicks page 2 you ask the database for rows 20 to 41 and so on.
That way you don't have to potentially send a resource intensive count (In case of say, user find with a lot of users) to the database.
The downside is that users can't jump between pages further than they have already asked for but normaly people give up after going a few pages down and if they need to go further they should/could specifiy their search more.

Is this something that is possible to do in the current grid?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Joakim
Top achievements
Rank 1
Share this question
or