剑道刷新(DropDownList.refresh())不工作错误未定义 [英] Kendo Refresh (DropDownList.refresh()) not working ERROR Not define
本文介绍了剑道刷新(DropDownList.refresh())不工作错误未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在另一个 DropDownList 更改后刷新下拉列表,但 Refresh() 方法是未定义的错误正在提升.因为我再次尝试读取数据源,它显示它正在加载,但数据仍然相同.请帮助解决这个问题.
Im trying to refresh the Drop Down List after another DropDownList is Change But the Refresh() method is Undefined Error Is Promoting.There For I Tried the Read the DataSource again and it shows it loading but the data is still the same.Help to Solve this Issue please.
代码:
$("#DropDownList1").change(function () {
custCode = $("#DropDownList1").val();
$("#titles").data("kendoDropDownList").dataSource.read(); //shows list Loading But Same Data Is present .
$("#titles").data("kendoDropDownList").refresh(); //NOT Working
});
推荐答案
1- 尝试在 Kendo DropDownList 的数据源读取属性中添加 cache: false
以禁用缓存:
1- Try adding cache: false
to disable the cache in Kendo DropDownList's datasource read property:
read: {
url: <<"url">>,
cache: false
}
2- 然后调用 read()
,
$("#ddl").data("kendoDropDownList").dataSource.read();
它对我有用:)
这篇关于剑道刷新(DropDownList.refresh())不工作错误未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文