Populating The Rows On Pagination Click

2 posts, 0 answers
  1. Sibin
    Sibin avatar
    1 posts
    Member since:
    Jul 2011

    Posted 24 Mar 2017 Link to this post

    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

     

  2. Stefan
    Admin
    Stefan avatar
    2819 posts

    Posted 28 Mar 2017 Link to this post

    Hello Sibin,

    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 visualization (charts) and form elements.
Back to Top