剑道的ListView:着刷新(重装)的数据 [英] Kendo ListView: cant refresh (reload) data
本文介绍了剑道的ListView:着刷新(重装)的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是我的ListView:
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()
)
下面是必须重新加载数据的JavaScript函数:
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
};
}
我做的所有写在文档但犯规看到任何postback.Whats错了?
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();
这篇关于剑道的ListView:着刷新(重装)的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文