-
3 Jul 2012 6:44 AM #1
Answered: Change Tree Node style after load
Answered: Change Tree Node style after load
Hi there,
I have been looking around in the Internet but I could not find an answer for this. How can I add/remove a stylesheet class to a node in the tree store's load event?
In Ext 3 I used to do just this:
but now the NodeInterface class does not provide with anything like that, so what's the way of doing it?Code:load : function(store, node){ node.getUI().addClass('myClass'); }
I have also seen a question regarding why the getUi method was removed but nobody has answered.
Well, any help is really appreciated.
Cheers
-
Best Answer Posted by droessner
Try node.set('iconCls', 'myClass');
-
3 Jul 2012 11:06 AM #2
Try node.set('iconCls', 'myClass');
-
3 Jul 2012 10:38 PM #3
Thanks dude! That worked. In my case was:
Code:node.set('cls', 'myClass');


Reply With Quote