Retrieve dataitems from all pages

2 posts, 0 answers
  1. Keshav
    Keshav avatar
    2 posts
    Member since:
    Jan 2016

    Posted 22 Jan Link to this post

    Hello

     I know that I can get all items on page by the following:

     

    var grid = $("#grid").data("kendoGrid");
            console.log(grid.dataitems());

     

    If I apply a filter on the columns then the above code will only print the items returned after filtering.

     

     Now my question is how do I get all the dataitems from all the pages, both before and after filtering?

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 26 Jan Link to this post

    Hi Keshav,

    The dataItems method will return the items that are displayed in the grid (on the current page, with the applied filter, etc.). If you are using client-side filtering you could use the dataSource data method for retrieving all items:
    $("#grid").data("kendoGrid").dataSource.data()

    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top