Results 1 to 3 of 3

Thread: Change Tree Node style after load

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    95
    Answers
    3
    Vote Rating
    2
      0  

    Default 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
    Sencha Premium User
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    316
    Answers
    59
    Vote Rating
    59
      0  

    Default

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

  4. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    95
    Answers
    3
    Vote Rating
    2
      0  

    Default

    Thanks dude! That worked. In my case was:

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •