on 09-09-2005 2:29 AM
Hello,
I have a mastercolumn of type TreeByNestingTableColumn in my Table to provide a tree structure within one column.
I need to automatically expand/collapse particular and/or all nodes of the tree structure. The tree is created dynamically by filling a recursive node at runtime.
I'd be thankful for any idea on this.
Thanks,
Lars
Lars,
Given:
1. Your table is bound to recursive node (no other way for TreeByNestingTableColumn)
2. In recursive node there is a boolean attribute that hold expanded / collapsed state. Corresponding property of TreeByNestingTableColumn is bound to this attribute.
Then:
Just traverse elements / sub-nodes (for recursion) recursively (pardons for tautology) from given element and set this boolean attribute to either true or false to expand / collapse tree.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valery,
This would only work if the children are loaded right? If the children are not loaded then there will be no child nodes to traverse. Im facing this scenario now.
Say I want to expand all nodes in my TreeByNestingTableColumn the first time the application is launched? How would I do this? At this point only the root element is loaded into the table. Further children elements are loaded only when I click the expand triangle of each node.
M
Valery,
thanks a lot. That should work.
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.