TreeViewThe node text in the control can be in one of two modes: select mode or navigation mode.
By default, a node is selected. To make a node in navigation mode, set the value of the NavigateUrl attribute of the node to a value other than the Null String. To make the node in the selection mode, set the NavigateUrl attribute of the node to a null string.
By default, clicking a node in select mode will send the page back to the server and cause the SelectedNodeChanged event. You can also selectSelectActionAttribute to specify other events. To determine which node is in the selection mode when clicked, use the SelectedNode attribute of the TreeView control.
When the node Is In navigation mode, all selection events of the node are disabled. When you click a Node In navigation mode, the user is directed to the specified URL. You can set the Target attribute to specify the window or frame used to display the link content.
When the node is in the selection mode, useSelectActionAttribute specifies the event triggered when a node is selected. The following table lists available options.
Select Operation |
Description |
TreeNodeSelectAction. Expand |
Switches the expand and collapse statuses of nodes. Trigger the TreeNodeExpanded event or TreeNodeCollapsed event accordingly. |
TreeNodeSelectAction. None |
No event is triggered when a node is selected. |
TreeNodeSelectAction. Select |
The SelectedNodeChanged event is triggered when a node is selected. |
TreeNodeSelectAction. SelectExpand |
The SelectedNodeChanged and TreeNodeExpanded events are triggered when a node is selected. Nodes are displayed only, but not folded. |