Changing cls property TreeNode

  1. #1

    Changing cls property TreeNode

    Hi,

    How can I change the cls property for a TreeNode in beforeClick listener?
    At the beginning the cls is set to 'strikeout-text' and when I click in node I want to reset the cls.
    I have tried this but it isn't works

    Thanks a lot.
        
    
    
    .strikeout-text
    
    {
    
    text-decoration: line-through;
    
    }
    
    
    <ext:TreePanel 
    
    ID="TreePrestationBuilder" AutoScroll="true" ContainerScroll="true" Title="<%$ Resources: CreatedRates %>"
    
    UseArrows="true" RootVisible="false" Animate="true" BufferResize="true" runat="server"
    
    Border="false" BodyBorder="false" EnableDrop="false" EnableDrag="false" ContextMenuID="TreeBuilderContextMenu">
    
    <Root>
    
    <ext:AsyncTreeNode NodeID="Root" Text="Root" Expanded="true" />
    
    </Root>
    
    <Listeners>
    
    <BeforeLoad Fn="loadBuiltNodes" />
    
    <BeforeClick Handler="node.attributes.cls = ''; node.setText('test');" />
    
    </Listeners>
    
    </ext:TreePanel>

    </PRE>
  2. #2

    RE: Changing cls property TreeNode

    Hi,

    Use
    node.ui.addClass('myclass')
    node.ui.removeClass('myclass')
  3. #3

    RE: Changing cls property TreeNode

    it's works, thanks a lot!

Similar Threads

  1. Replies: 3
    Last Post: Dec 15, 2011, 12:18 PM
  2. IconCls property on TreeNode does not work
    By captainst in forum 1.x Help
    Replies: 2
    Last Post: Oct 11, 2011, 4:53 PM
  3. [CLOSED] how to set panel html property as javascript property
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jan 05, 2011, 6:45 PM
  4. [CLOSED] TreeNode Expanded property
    By ewgoforth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 07, 2010, 3:29 PM
  5. Replies: 0
    Last Post: Dec 10, 2009, 11:14 AM

Posting Permissions