PDA

View Full Version : Change treenode icon after rendering treepanel?



anakonda8472
7 Mar 2008, 7:23 AM
Hello!

Does anyone know, how I can change a treenode's icon AFTER the tree was rendered!

I tried node.iconCls and node.cls but the icon was allways the same! Is there a function to activate the new icon? Tree.render() doesn't work either!

Ciao!

Condor
7 Mar 2008, 8:09 AM
Try


node.getUI().getIconEl().dom.src = newIcon;
or

node.getUI().getIconEl().dom.className = 'x-tree-node-icon ' + newIconCls;