PDA

View Full Version : AsyncTreeNode - can I force ajax refresh?



kyriakos
13 Feb 2007, 7:13 AM
I am sure there must be a way to do this. I update the underlying database to my tree on a specific asynctreenode, how do i get the node to call the loader again to load the updated contents?

kyriakos
14 Feb 2007, 4:10 AM
Still havent figured this out. Can anyone help?

seldon
14 Feb 2007, 5:23 AM
Ok, i think this might work:

first delete all childnodes of your particular node:


while(mynode.firstChild){
mynode.removeChild(mynode.firstChild);
}

Then set the node to loaded = false:


mynode.loaded = false;

And call the


mynode.expand(true);

This should work. Perhaps instead of the last line you must do:


mynode.expand();
mynode.renderChildren();

Let me know if it works!

Cheers,

Seldon

kyriakos
14 Feb 2007, 11:08 PM
Thanks for your help. Works when done in the following order:


while(pnode.firstChild){
pnode.removeChild(pnode.firstChild);
}
pnode.loaded = false;
pnode.renderChildren();
pnode.expand();