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