please me find solution insert html table inside node of treepanel ext js.
find screenshot:
here sample:
http://jsfiddle.net/arunv/kgksk/
it should started.
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; }
Comments
Post a Comment