How to collapse a TreeNode and its children? Options

codeling Posts: 1057 Points: 4443
Posted: Monday, November 13, 2017 8:56:28 AM

The method TreeNode.Collapse(Boolean) can be used to collapse a TreeNode and optionally its children.

  • passing false value when want to collapse itself and its children
  • passing true value when you want to collapse a node but leave its child nodes in their expanded state.

 

 

codeling Posts: 1057 Points: 4443
Posted: Monday, November 13, 2017 8:58:53 AM

The TreeView.CollapseAll() method collapses all the TreeNode objects, including all the descendant tree nodes in the TreeView control.

Users browsing this topic
Guest