1. #1
    Sencha User
    Join Date
    Nov 2008
    Posts
    92
    Vote Rating
    1
    diablo is on a distinguished road

      0  

    Default Tree node css class

    Tree node css class


    I want to change the css class of a tree node after a certain action has been performed. In API i have not found something to resolve this. I have made a custom setter function when i am building each node of the tree with Ext.tree.AsyncTreeNode but it seems it has no effect.

    Any hint is valuable.

    Thanks in advance!

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Posts
    92
    Vote Rating
    1
    diablo is on a distinguished road

      0  

    Default


    Quote Originally Posted by diablo View Post
    I want to change the css class of a tree node after a certain action has been performed. In API i have not found something to resolve this. I have made a custom setter function when i am building each node of the tree with Ext.tree.AsyncTreeNode but it seems it has no effect.

    Any hint is valuable.

    Thanks in advance!
    I have found a possibility accessing the treeNodeUI has the methods that i need addClass(), removeClass(). hopefully will help.

    thx

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Here is an example that changes the tree node icon.

    You can adapt it to change the tree node cls itself.

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Posts
    92
    Vote Rating
    1
    diablo is on a distinguished road

      0  

    Default


    @Condor - thank you for your suggestion! it worked with removeClass() followed by add new Class().

    i would appreciate a hint for same kind of action but in a Grid. I have a grid row selected and after a certain action is executed to change the selected row icon that is shown in a grid column. I have managed to change the typeIcon inside, but i cannot refresh/commit the row. I have tried several ways : grid.doReload(), store.data.clear(), selectedRow.commit(), store.commitChanges() etc. but neither of this seems to update the icon with the new one...

    thx!

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    I assume your column renderer displays an icon based on the value of some field?

    In that case you only need to change the field, e.g.
    Code:
    var record = store.getAt(rowIndex);
    record.set('myfield', newValue);

  6. #6
    Sencha User
    Join Date
    Nov 2008
    Posts
    92
    Vote Rating
    1
    diablo is on a distinguished road

      0  

    Default


    Thank you Condor! You rock!

    It works now! Thx!

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar