无法读取Kendo Pivot Grid MVC中未定义的属性“值" [英] Cannot read property 'value' of undefined in Kendo Pivot Grid MVC

查看:127
本文介绍了无法读取Kendo Pivot Grid MVC中未定义的属性“值"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Kendo Pivot Grid.当我展开行时,控制台出现错误.

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

无法读取未定义的属性'value'.

在出现错误之前,我正在使用JavaScript刷新数据源,并且未删除度量和维.

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();

推荐答案

在四处搜寻之后,我终于找到了答案,并认为我愿意与大家分享,以便将来的求职者得到答案.如果要刷新Kendo数据透视网格上的数据,应在调用read()之前先在数据源上调用trigger("stateReset").

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

这篇关于无法读取Kendo Pivot Grid MVC中未定义的属性“值"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆