获取更新的剑道树视图数据源 [英] Get updated Kendo Tree View data source
本文介绍了获取更新的剑道树视图数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在显示带有数据源的树状视图,但是拖放后将发生变化,我必须获取更改后的新数据源.我怎么做?
I am showing the tree view with a datasource but after dragging and dropping there will be changes and I have to get that changed new datasource. How do I do that?
$.ajax({
type: "POST",
url: "TestMenu.aspx/GetMenuData",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$("#treeview").kendoTreeView({
dragAndDrop: true,
dataSource: $.parseJSON(data.d)
});
}
});
推荐答案
因此,我终于完成了任务.将答案发布给正在寻找与我相同答案的任何人.
将该呼叫更改为:
So, I finally accomplished the task. Posting answer for anyone who's looking for the same answer as I was.
Changed the call to:
$.ajax({
type: "POST",
url: "TestMenu.aspx/GetMenuData",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$("#treeview").kendoTreeView({
dragAndDrop: true,
dataSource: $.parseJSON(data.d)
}).data("kendoTreeView");
}
});
然后获取更新的数据源:
Then to get the updated data source:
var treeviewDataSource = $("#treeview").data("kendoTreeView").dataSource.view();
这篇关于获取更新的剑道树视图数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文