4

I am working with Kendo Pivot Grid. When I expand row I get error in console.

Cannot read property 'value' of undefined.

Before I get error I was refresh datasource with JavaScript and I didn't remove Measures and dimensions.

When I remove Measures and dimensions and after that refresh datasource everything is okay and I don't get error above.

$("#pivotgrid").data("kendoPivotGrid").dataSource.read();
Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
Zvone
  • 41
  • 3

1 Answers1

2

After searching around I finally found the answer to this and thought I'd share so future seekers will have an answer. When you want to refresh the data on a Kendo Pivot Grid you should call trigger("stateReset") on the dataSource before calling read().

Something like this should work:

var grid =  $("#grid").data("kendoPivotGrid").dataSource;
grid.trigger("stateReset");
grid.read();

Found here after a lot of digging: Source

Alan
  • 53
  • 6