0

I have the following code:

function foo()
{
    var view = $("#myGrid").data("kendoGrid").dataSource.view();
    var data = $("#myGrid").data("kendoGrid").dataSource.data();

    var b = (view == ds);
}

My grid has 6,527 records, with 10 records per page. Both my view and data objects only have 10 elements.

In this scenario, b is true.

According to:

  • This post, my second line is supposed to return all rows from all pages
  • This answer implies the same thing -- that dataSource.data() would return all of the data
  • From Telerik's forum again it looks like data() should be what I want

So, how can I get all rows of data from my grid, even if they aren't currently visible?

sab669
  • 3,984
  • 8
  • 38
  • 75

1 Answers1

2

To get all the data items, you need to disable server-side data operations in the dataSource settings. Note that this will make the DataSource instance request all items at once, which will slow down initial data binding.

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

http://docs.telerik.com/kendo-ui/framework/datasource/overview#mixed-data-operations-mode

dimodi
  • 3,969
  • 1
  • 13
  • 23