Reputation: 111
Here is my ListView:
@(Html.Kendo().ListView<Entity>()
.Name("listView")
.TagName("div")
.ClientTemplateId("template")
.DataSource(dataSource => {
dataSource.Read(read => read.Action("Products_Read", "Home").Data("additionalData"));
dataSource.PageSize(4);
})
.Pageable()
)
Here are javascript function that must reload data:
var someData = "-1";
function reload() {
// insure that function exists
// alert( $("#listView").data("kendoListView").refresh)
$("#listView").data("kendoListView").refresh();
}
function additionalData() {
return {
someData: someData
};
}
I do all as written in documentation but doesnt see any postback.Whats wrong?
Upvotes: 7
Views: 16485
Reputation: 8275
refresh()
(see refresh) only refreshes data on screen but don't reload data. If you want to do so, you have to use read()
:
$("#listView").data("kendoListView").dataSource.read();
Upvotes: 23