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?
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();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With