我将Kendo UI网格绑定到使用xml填充的数据源。Kendo UI Grid和组合列
它适用于我。
现在我想用'n'多个值(用逗号分隔)嵌套节点中的每一行的单元。 xml文件的
例子:
<product id="1">
Microsoft Office
<tags><tag>microsoft</tag></tags>
</product>
<product id="1">
Ububtu Linux
<tags><tag>Canonical</tag><tag>OS</tag><tag>Open Source</tag></tags>
</product>
<product id="1">
Windows 8
<tags><tag>microsoft</tag><tag>OS</tag></tags>
</product>
</product>
我想要的结果:
ID Product Tags
1 Microsoft Office microsoft
2 Ubuntu Linux canonical, OS, Open Source
3 Windows 8 microsoft, OS
对于第2个栏没有任何问题:
$("#grid").kendoGrid({
dataSource: {
type: "xml",
transport: {
read: { url: 'some_remote_xml',
dataType: "xml"
}
},
schema: {
type: "xml",
model: {
fields: {
id: { field: 'product/@id', type: "number" },
Product: { field: 'product/text()', type: "string" }
}
我怎样才能使“标签'列?
任何帮助将不胜感激!
1)提供了一个 “行模板”,这是在这里证明:
它也可以使用'schema.parse'来解决与合并'Tags'的内容创建_virtual_列。 – OnaBai 2013-04-11 20:06:00
很想看到作为答案张贴的示例:) – 2013-04-12 11:52:25
你在挑战我吗? :-)是因为它不可能或完整性问题? – OnaBai 2013-04-12 12:19:31