PDA

View Full Version : TreePanel html after render



FSM
26 Nov 2009, 2:08 AM
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

Condor
26 Nov 2009, 2:43 AM
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).

FSM
26 Nov 2009, 2:46 AM
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?

Condor
26 Nov 2009, 3:36 AM
Use the expandnode event (remember that it will fire multiple times if you have a multi-level nesting).