Listview reads datasource only once in IE

1 posts, 0 answers
  1. Dave
    Dave avatar
    17 posts
    Member since:
    Jan 2009

    Posted 24 Sep 2012 Link to this post

    I have the following:

    @(Html.Kendo().ListView<CourseServiceModel.CourseSearchResult>(Model)
            .Name("CourseListView")
            .TagName("div")
            .ClientTemplateId("template")
            .DataSource(dataSource =>
            {
            dataSource.Read(read => read.Action("GetSearchedCourses", "SearchCourse").Data("getSortBy"));
            dataSource.PageSize(10);
        })
            .Pageable(x => x.PageSizes(true).Refresh(true).Info(true).PageSizes(new int[]{10,25,50}))
          )

    On the first time the page loads, the datasource is read as expected. On subsequent post the datasource does not get read, no ajax calls.

    Works fine in FF and Chrome only an issue in IE (8,9).

    Sounds like a caching issue but not sure where to start....

    The page navigation is <page to set search criteria> -> RedirectToRoute("Results") -> <Results (contains ListView)> 

    This was posted in the UI forum by mistake.

    <RESOLVED>

    the issue was IE caching ajax responses.  I tried to add in the headers to not cache etc.that did not work, so had to use a "cache buster" time stamp in the post back data in the getSortBy json object.  Maybe this will help someone else.

    function getSortBy() {
           return {
               sortByCritera: $("#SortBy").data("kendoDropDownList").dataItem(),
               timeStamp: Date()
           };
       }
Back to Top