PDA

View Full Version : TreeGrid get node value



suho0121
2 Nov 2010, 5:46 PM
Hi~
I'm using the TreeGrid. I want to treegid node value
What should I do?
help plz~


var tree = new Ext.ux.tree.TreeGrid({
width : 760,
height : 590,
id : 'tree-panel',
enableDD : false,
columns : items,
tbar : tbar,
lines : true,
autoScroll : true,
selModel : sm,
enableSort : true,
loader : treeLoader,
listeners : {click : function(node){
alert('You clicked: "' + ???????? + '"');
}
}






23119

Condor
3 Nov 2010, 12:53 AM
That all depends on how you defined your columns!

- If you specified a 'tpl' then it's: tpl.apply(node.attributes)
- If you didn't specify 'tpl', but you did specify 'dataIndex': node.attributes[dataIndex]
- If you didn't specify 'tpl' nor 'dataIndex': node.text

suho0121
3 Nov 2010, 1:31 AM
Good! I got it
Thanks Condor^^