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

Populating The Rows On Pagination Click

1 Answer 753 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sibin
Top achievements
Rank 1
Sibin asked on 24 Mar 2017, 08:50 PM

Hi,

I am getting the Data from an API where, I get only the first 2 page data At a time.

That is total 50 row records, and I will be showing 25 each in both the pages.

Now the issue is When I get my first 50 records from the API, I know total there are 147 Items, that is I will get all the data only after 3 web api calls.

Now I do not want all the records from the API before the user click on any page.

So after my first call. that I got 2 pages of grid( 25 + 25 = 50), but I know there are four more pages to get all 147 data.

So can I display the rest four more pagination, on click of that pagination can i get relevant data from API.

It looks complicated to explain and to implement.

Is it possible to implement this scenario with Kendo grid, or can I go ahead with a custom grid implementations. Thanks for your time

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Mar 2017, 01:00 PM
Hello ,

In general, the Kendo UI Grid supports two different options for paging, but only the serverPagin can achieve a similar to the desired result but not completely the same.

1) Client paging- All of the data is requested at once and the paging is done automatically by the Grid.

2) Server paging - the paging is done on the server, the Grid is making requests page by page:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-serverPaging

As for displaying information of the total numbers, this can be achieved using the schema.total property of the Grid:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total

Please let me know if additional information is needed on this matter.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
Sibin
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or