1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    95
    Vote Rating
    2
    Answers
    3
    Albareto is on a distinguished road

      0  

    Default 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:

    Code:
    load : function(store, node){
        node.getUI().addClass('myClass');
    }
    but now the NodeInterface class does not provide with anything like that, so what's the way of doing it?

    I have also seen a question regarding why the getUi method was removed but nobody has answered.

    Well, any help is really appreciated.

    Cheers

  2. Try node.set('iconCls', 'myClass');

  3. #2
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    311
    Vote Rating
    52
    Answers
    59
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      0  

    Default


    Try node.set('iconCls', 'myClass');

  4. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    95
    Vote Rating
    2
    Answers
    3
    Albareto is on a distinguished road

      0  

    Default


    Thanks dude! That worked. In my case was:

    Code:
    node.set('cls', 'myClass');

Thread Participants: 1

Tags for this Thread