1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    9
    Vote Rating
    0
    FSM is on a distinguished road

      0  

    Default TreePanel html after render

    TreePanel html after render


    Hi, I have a tree panel which after its rendered i want to access the html
    this.sampleTree.on('afterrender', function()
    {
    GetHoldOfHTML();
    }, this);
    Is this the actual way to do this or could someone point me in the right direction

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Is the tree loaded asynchronously (Ext.tree.AsyncTreeNode) or directly (Ext.tree.TreeNode)?

    An asynchronously loaded tree won't have rendered the nodes yet in the afterrender event (you'll have to wait for the 'load' event).

    If the tree is animated (animate is true by default) then the child nodes also won't be rendered in the afterrender event (you'll have to wait for the 'expandnode' event).

  3. #3
    Ext User
    Join Date
    Sep 2009
    Posts
    9
    Vote Rating
    0
    FSM is on a distinguished road

      0  

    Default


    Thanks Condor

    the animate is set to true and the rootNode is set to new Ext.tree.AsyncTreeNode...
    will i need both a load and expannode call?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use the expandnode event (remember that it will fire multiple times if you have a multi-level nesting).

Thread Participants: 1