0
<ArrayOfNode xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://....Controllers">
<Node>
<notificationType>Test1 (20)</notificationType>
<notifications xmlns:d3p1="http://...Serialization/Arrays">
<d3p1:string>3298</d3p1:string>
<d3p1:string>983932</d3p1:string>
... (20 items here)
</Node>
<Node>
<notificationType>Test2 (40)</notificationType>
<notifications xmlns:d3p1="http://...Serialization/Arrays">
<d3p1:string>ABCD</d3p1:string>
<d3p1:string>AZYX</d3p1:string>
...(40 items here)
</Node>
</ArrayOfNode>
这不是工作:如何在Kendo UI树视图中加载以下HTTP响应?
var notificationTypes = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: "http://..."
}
},
schema: {
model: {
notificationType: "notificationType",
notifications: "notifications",
children: "notifications",
string: "string",
hasChildren: true
}
}
});
$("#treeview").kendoTreeView({
dataSource: notificationTypes,
checkboxes: {
checkChildren: true
},
dataTextField: ["notificationType", "notifications"]
});
只加载父节点,但我想使每个节点的“通知”儿童项目的树。
它应该是这样的:
- Test1的(20)
- 3298
- 983932
- 的Test2(40)
- ABCD
- 983932
我认为你缺少架构中的子对象。你有没有尝试使用KendoUI服务器包装?让生活变得更容易, – Nilesh
你能告诉我一个例子吗? –
我现在没有示例,因为我正在旅行,无法访问代码!如果你有一个帐户,你可以访问KendoUI网站并下载最新的二进制文件。当我访问代码库时,我会尝试发布一些示例代码。 – Nilesh