You can create a node for the Treeview control statically-that is, it is created at design time. This method is useful if you want to create a tree with fixed items.
Note: you cannot define nodes in static mode or bind data to the Treeview control.
1. Add a node to the Treeview Control
1. In the design view, right-click the Treeview control and click Edit node ".
2. Under "Node" in "Treeview node Editor", click "add root node.
3. In the "attribute" grid, configure nodes by setting attribute values. Typical attributes to be set include:
· Expanded: Specifies whether the node is enabled by default.
· Text indicates the text displayed on the node.
· One Of The selectaction values specifies the conditions that occur when a user clicks a node.
4. To create a subnode, select the parent node in the "Treeview node Editor" and click the "add subnode" button.
5. After the node is created, click OK ".
2. delete a node from the Treeview Control
1. In the design view, right-click the Treeview control and click Edit node ". The "Treeview node Editor" is displayed ".
2. Under "Node" in the "Treeview node Editor", select the node you want to delete and click the "Remove node" button.
Note that when a node is deleted, all the child nodes of the node are also deleted. After the node is deleted, click OK ".