Welcome Guest Search | Active Topics | Sign In | Register

expand/collapse all Options
quirtep
Posted: Thursday, September 13, 2007 3:42:01 PM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2007
Posts: 133
I could not find this in the documention or demos... Is there a way to make a treeview expand or collapse all when a user clicks a link? Client side.

Thank you.
eo_support
Posted: Thursday, September 13, 2007 4:47:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

You can do something like this:

<a href="javascript:eo_GetObject('TreeView1').getTopGroup().getItemByIndex(0).setExpanded(true);">expand root node</a>

The above sample expand a TreeView's root node. You can also expand a child node like this:

eo_GetObject('TreeView1').getTopGroup().getItemByIndex(0).getSubGroup().getItemByIndex(3).setExpanded(true);

The above code expands the first top level node's fourth child node.

If you want to expand all parent nodes as well, you can call expandPath. Currently there is no "expandAll" function though.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.