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

Show several pagination pages but only query what the user see

2 Answers 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rolland
Top achievements
Rank 1
Rolland asked on 20 Oct 2016, 02:59 PM

Hello, 

I have a problem where I pull data from a huge database (over 140 000 entries) and have taken care to do my own pagination to limit loading time for my users.  

Basically, on pagination changes (next, prev, click on number etc.) I query my own 20 rows (which is pagesize) to fill up only what the user see and not pull tens of thousands of rows each time which would slow down the user's experience. 

So my problem is, if I do it this way, my table only shows my 20 rows and not whats available to the user. 

 

I have a line in my codebehind that returns the number of results I would like to tell RadGrid is available: 

var querySize = bllUsNet.ObtenirTout().Count;

 

Is there a way to "Trick" Radgrid into thinking there is that many entries but only return 20 ?

 

If anyone has an idea of a better title for this thread, I had a hard time to find one :)

 

Thanks

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 25 Oct 2016, 12:13 PM
Hello Rolland,

In order to implement the functionality you should use Custom Paging. This way you can return only the relevant items from the data source of the Grid.

Check out the following resources that describe the functionality in more detail. You can also see a live example on how Custom Paging works.



Regards,
Viktor Tachev
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Rolland
Top achievements
Rank 1
answered on 25 Oct 2016, 01:46 PM

Thanks Viktor, 

 

The VirtualItemCount  was exactly what I needed !

 

Tags
Grid
Asked by
Rolland
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Rolland
Top achievements
Rank 1
Share this question
or