Home - Forums-.NET - FlyTreeView (ASP.NET) - How to expand a node and its branch with code?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

How to expand a node and its branch with code?
Link Posted: 11-Apr-2010 07:12
To expand a node, it's easy with Mouse by clicking "+".
Howerver, I wonder how to do that with code.

1.
FlyTreeView1.SelectedNode.expand();//???????????
///No,nothing happened

2.
  FlyTreeView1.ExpandLevel=5;//suppose that the node's level=5
  The result is that not only one node but also all nodes with same level are expanded!
  

How to expand only branch?
Link Posted: 13-Apr-2010 14:05
Do you mean server or javascript code?

For server use
FlyTreeView.SelectedNode.Expanded = true;


For client-side please refer to demo at:
http://www.9rays.net/asp.net_2/treeview/Demo_ClientSidePopulation.aspx