Profile Picture

Programmatically Show/Hide nodes in a tree

Posted By Rotha Aing 12 Years Ago
Author
Message
Rotha Aing
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 2, Visits: 1
Hi,

Is there a way to programmatically set nodes to either be expanded or collapsed? I would like to create some controls that will go through the diagram and expand certain nodes while leaving others collapsed.

Currently I am using the NShowHideSubtreeDecorator.

Thanks

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

You can use the ToggleState() method of the show/hide subtree decorator to achieve this:

showHideSubTreeDecorator.ToggleState();

document.SmartRefreshAllViews();

Note, that if you want to check if the decorator is currently expanded or not you can use its GetState() method.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic