回答
这里有一个例子:
http://jsfiddle.net/arunv/kGksk/
应该帮助您开始。
ExtJS的:
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "alegrbra", leaf: true}
] },
{ text: '<table class="sample_table"><tr><td>11</td><td>12</td></tr><tr><td>21</td><td>22</td></tr></table>', leaf: true }
]
}
});
var tree = Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
useArrows: true,
width: 500,
height: 500,
store: store,
rootVisible: false,
renderTo: Ext.getBody()
});
var root = tree.getRootNode();
root.appendChild({ text: '<table class="sample_table"><tr><td>aa</td><td>ab</td></tr><tr><td>ba</td><td>bb</td></tr></table>', leaf: true});
CSS:
.sample_table {
display: inline-block;
}
.sample_table td {
border: 1px solid black;
padding: 5px;
}
谢谢Arun,是否有其他方式使用tpl或itemTpl – Feroz 2013-05-07 05:11:26
我不知道任何开箱即用的模板与树木。您可以尝试使用Ext.Template:http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.Template – 2013-05-13 20:10:30
实际上,您可能可以在TreePanel的TreeView上使用itemTpl – 2013-05-13 20:15:25
- 1. 插入Ext-js
- 2. EXT-JS 4x,无法看到输出
- 3. 插入JSON到MySQL表中节点JS
- 4. Ext-JS 4.1 - 如何将静态XML数据加载到Ext.data.TreeStore中
- 5. 从节点js在cassandra中插入BigInt
- 6. 节点js Postgresql - 错误时插入表
- 7. 插入NULL - 节点Js // MongoDB
- 8. 如何在html文件中插入节点js脚本
- 9. HTML ext js fieldsets
- 10. MySQL插入不工作在节点js
- 11. 缺点ext js
- 12. 在链表中插入新节点
- 13. 在链接列表中插入节点
- 14. 节点JS:没有插入到mongodb
- 15. 不能从节点js插入mysql
- 16. 处理重复插入节点JS
- 17. 节点JS插入Mysql的不工作
- 18. 节点js mongo查找最后插入
- 19. 在链表列表前插入节点
- 20. 在链表中插入两个节点之间的节点
- 21. 插入链表和节点
- 22. 在Netzke中使用Ext JS插件
- 23. Ext JS 4 TextArea - 如何设置插入点?
- 24. 插入节点
- 25. 插入节点
- 26. 在节点XSLT内插入新节点
- 27. 插入HTML元素的节点
- 28. 将节点插入到双链表中
- 29. 在textfield(表单)之后插入节点
- 30. 在链表末尾插入节点
我不知道,但也许它可以与Ext.tree.View做,要么TPL或itemTpl – 2013-05-06 10:36:26
你能请张贴的示例代码 – Feroz 2013-05-06 11:27:37