Kendo UI MVC Grid not Refreshing on IE

Header

I have a standard Kendo UI MVC Grid binding to a remote data source via Ajax and WCF Data Services / OData.  When items are added to the data source or items are edited and I redirect to the action and view containing the grid, the grid refreshes perfectly fine in Chrome and Firefox.  It does not, however, refresh in Internet Explorer 8, 9, or 10.  I have not tested 11, but I assume the behavior is the same.

Solution

This appears to be a caching issue.  Disabling the cache for that action solves the problem.  Disable the cache by adding the Output Cache attribute to your controller’s action:

[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public ActionResult IncidentsRead([DataSourceRequest] DataSourceRequest request, IncidentSearchCriteria incidentSearchCriteria)
{
return this.Json(this.GetIncidentFlats(incidentSearchCriteria).ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}

Hope this helps someone!

Happy coding,
Tom Hundley

PS:  I very big thanks to Daniel on the Telerik support team to helping me identity and fix this issue!

One response to “Kendo UI MVC Grid not Refreshing on IE

  1. Why does this not work ? Did it work sometime ? I’ve spent 2 days trying to stop IE from caching AJAX calls from the grid, and I can’t get the grid to add any sort of parameter to stop caching.

    Like

What are your thoughts?

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.