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

Retrieve dataitems from all pages

1 Answer 1306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keshav
Top achievements
Rank 1
Keshav asked on 22 Jan 2016, 04:00 PM

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?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 26 Jan 2016, 11:38 AM
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
Tags
Grid
Asked by
Keshav
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or