Kendo Grid 数据源刷新在 IE 中不起作用 [英] Kendo Grid datasource refresh does not work in IE

查看:29
本文介绍了Kendo Grid 数据源刷新在 IE 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 ajax 调用的成功处理程序中使用以下代码更新数据后,我试图刷新我的剑道网格:

I was trying to refresh my kendo grid after doing an update of the data by using the following piece of code in the success handler of my ajax call:

$("#grid").data("kendoGrid").dataSource.read();
$("#grid").data("kendoGrid").refresh();

好吧,这在 Mozilla 和 Chrome 中刷新并按预期完美运行,但在 IE 中刷新似乎不起作用,数据源也没有更新.我是否需要对代码进行任何特定修改才能使其在 Internet Explorer 中也能正常工作?

Well this refreshes and works perfectly as expected in Mozilla and Chrome but in IE the refresh does not seem to work nor does the datasource update. Do I need to make any particular modifications in my code to get it working in Internet Explorer as well?

PS:我什至碰巧尝试过 $("#grid").data("kendoGrid").dataSource.sync();这也不起作用.

推荐答案

感谢 knikolov 的回答.好吧,问题是结果正如您所说的被缓存(我实际上使用的是 IE10).能够通过在数据源的传输元素中指定cache: false"来解决该问题.

Thanks for the answer knikolov. Well the issue was that the result was being cached as you said(I was using IE10 infact). Was able to resolve the issue by specifying "cache: false" in the transport element of the datasource.

transport: {
    read: {
        url: "xyz.svc/ab",
        cache: false
    }
} 

这篇关于Kendo Grid 数据源刷新在 IE 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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