0
所以我的劍道樹視圖出現問題。即時獲得正確的父母,但在子節點上,它具有與無窮大的子節點相同的另一個級別。我試圖在我的子節點中設置'hasChildren = false',但它不起作用。希望你能幫助我。kendo treeview在子節點中獲得無限循環
這裏是我的代碼:
HTML:
<div id="treeview1"></div>
腳本:
var Customer = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: '/Position/LoadGetCompanyList',
dataType: "json"
}
},
schema: {
model: {
id: "ID",
hasChildren: true,
children: Positions
}
}
});
var Positions = {
transport: {
read: {
url:'/Position/LoadIndustriesPositionList',
dataType: "json"
}
},
schema: {
model: {
id: "ID",
hasChildren: false
}
}
};
$("#treeview1").kendoTreeView({
dataTextField: ["CompanyName", "JobName"],
// dataValueField: "Client_CustomerID",
// select: function (e) {
// console.log("Selecting ", e.node)
// },
dataSource: Customer
}).data("kendoTreeView");
生病附上我引用這裏的鏈接: http://rameshrajappan.wordpress.com/kendo-treeview-with-asp-net-mvc/ http://demos.telerik.com/kendo-ui/treeview/remote-data-binding
感謝。