| nType | (Long) Specifies whether the item will be collapsed or expanded.
0 - Collapses the tree item, i.e. the subitems will not be visible.
The onExpand event is triggered after collapsing. 1 - Expands the tree item, i.e. the subitems will be visible.
The onExpand event is triggered after collapsing. For dynamic items (see RequestType) the onItemRequest event is triggered. |
|---|---|
| nLevel | [optional] (Long) Specifies the level to which the item will be collapsed/expanded.
0 (default) - Expands/collapses only the corresponding item.
1 - Expands/collapses all direct subitems of the specified item.
-1 - Expands all subitems of the specified item down to the last level. (only if the nType parameter is set to 1). |
oTreeItem1.SetExpanded(0);
// Collapses the item
oTreeItem1.SetExpanded(1);
// Expands the item
oTreeItem1.SetExpanded(1, -1);
// Expands all subitems down to the last level.