Home - Forums-.NET - FlyTreeView (ASP.NET) - Expanding/Collapsing whole tree from Javascript.

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Expanding/Collapsing whole tree from Javascript.
Link Posted: 09-Feb-2006 01:40
Hi,
I'm testing the control and trying to collapse/expand the whole tree using Javascript. i wrote the following function but it does not expand the whole tree but only the first child of the root node get completely expanded.

Here is the function i am using:

function expandall(param){
  if(param.Nodes){
    for(i=0;i      nd = param.Nodes[i];
      nd.ExpandLevel = 99;
      nd.Expand();
      expandall(nd);
    }
  }
}

Any idea?
Link Posted: 11-Feb-2006 13:25
Probably you should also specify the FlyTreeView.ForceInit = true;
Thus all client-side nodes will become initialized even before they are expanded.
Link Posted: 01-Mar-2006 03:28
Does it work ?
Link Posted: 04-Jan-2007 10:16
Is there a way to initialize subnodes from within javascript?
Link Posted: 05-Jan-2007 04:24
For FlyTreeView for ASP.NET 1.1, the client-side Node.AddNodes(xmlRepresentation) can be used.