This is a migrated thread and some comments may be shown as answers.

Listview reads datasource only once in IE

0 Answers 62 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 25 Sep 2012, 02:57 AM
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()
       };
   }

No answers yet. Maybe you can help?

Tags
ListView
Asked by
Dave
Top achievements
Rank 1
Share this question
or