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

Listview reads datasource only once in IE

3 Answers 142 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:53 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)> 


3 Answers, 1 is accepted

Sort by
0
Dmitriy
Top achievements
Rank 1
answered on 23 Oct 2012, 02:48 PM
IE cashes ajaxes, I think your promblem at this...
0
Paul
Top achievements
Rank 1
answered on 07 Dec 2012, 04:04 AM
Add this (jQuery) line to your javascript file...

$(document).ready(function ())
{
$.ajaxSetup({ cache: false });
}

This will turn off ajax caching in jQuery (and Kendo UI, which uses jQuery)
0
Stuart
Top achievements
Rank 1
answered on 10 Dec 2020, 10:06 AM

I know this is an old post but it might help other people:

When calling a JS method from the .Data class "Data("getSortBy")" it would work if you made it a function: .Data(@<text>function(e){ return getSortBy();}</text>)))

Tags
ListView
Asked by
Dave
Top achievements
Rank 1
Answers by
Dmitriy
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Stuart
Top achievements
Rank 1
Share this question
or