Kendo Grid datasource refresh does not work in IE

ⅰ亾dé卋堺 提交于 2020-01-14 12:53:05

问题


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

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: I even happened to try out $("#grid").data("kendoGrid").dataSource.sync(); which too was not working.


回答1:


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
    }
} 



回答2:


I guess you are using old IE browser, and the issue that you face is due to caching. This thread shows how to deal with caching in IE:

Prevent caching of pages in Internet Explorer 8



来源:https://stackoverflow.com/questions/29466255/kendo-grid-datasource-refresh-does-not-work-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!