PDA

View Full Version : examples/ux/treegrid/TreeGrid.js



Michael J.
18 Jan 2011, 12:09 PM
Hello, I`m using component TreeGrid.
I want to catch event when row is selected and increase it height,
but it cannot be done by standart
"getSelectionModel().on('rowselect', ..."
because TreeGrid doesn`t extend GridPanel.

Michael J.
19 Jan 2011, 8:31 AM
So Im using now component event like this
var tree = new Ext.ux.tree.TreeGrid({ ....});

tree.on("click", function(el){

var tr = Ext.fly(el);
alert(tr); // here I see "xnode-28"

if(tr.hasClass('x-tree-node-el')){
tr.toggleClass('x-treegrid-col-expanded');
}
})

But hasClass returns false, thow I see in dom structure that it has this class
<tr class="x-tree-node-el x-tree-node-leaf x-tree-selected" ext:tree-node-id="xnode-28" id="extdd-7">


So what can be wrong?