In This Topic
TreeView provides many different features that enable the developers to build intuitive and professional-looking applications. The main features for TreeView are as follows:
- Node Expansion
TreeView allows you to expand either a single node or all nodes in the tree as per the requirement. The TreeView control class provides the ExpandOnClick() method to expand a single node (parent or child), when you click on any node. And, AutoCollapse() method, which automatically closes the sibling nodes of the current selected parent node. For more information about node expansion, see Expanding and Collapsing Nodes.
- Node Selection and Navigation
TreeView supports both keyboard and mouse navigation of nodes. In addition, the control supports single and multiple node selection. You can select multiple nodes in a contiguous or a non-contiguous manner. For more information about navigation, see Navigation Nodes.
- Lazy Loading
TreeView allows you to delay the loading of a nodes child items until they are actually required. This is especially useful if you have a very deep tree, with lots of levels and child nodes and a simple example of this, is the folder structure of your Windows computer.
- Custom Nodes
TreeView allows the user to set custom nodes, these nodes can be a simple text, image icons, multiple icons, and check boxes. You can customize the content of the TreeView nodes using the formatItem event. The event handler parameters include the element, which represents the node and the data item being rendered. For more information about custom node content, see Custom Node.
See Also