4
votes

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.

2
Do you investigate the debug console, maybe something is throwing error and cutting the kendo's javascript.Oğuzhan Soykan
Well I did try that..there are no errors logged in the console and the funniest part is that when I try to run the piece from console directly(i.e. $("#grid").data("kendoGrid").dataSource.read()) it refreshes the grid data as expected. It is not that the success handler does not execute at all cause the rest of the code as specified in the handler does execute and give results as expected.Suraj Nair

2 Answers

3
votes

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
votes

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