Gets or sets the event or events to raise when a node to which the System.Web.UI.WebControls.TreeNodeBinding object is applied is selected.
Documentation for this section has not yet been entered.
When the System.Web.UI.WebControls.TreeView control is bound to a data source, use the TreeNodeBinding.SelectAction property to specify the value to bind to the TreeNode.SelectAction property of a System.Web.UI.WebControls.TreeNode object. This binding relationship affects all System.Web.UI.WebControls.TreeNode objects to which the System.Web.UI.WebControls.TreeNodeBinding object is applied. The TreeNode.SelectAction property is used to specify which event or events are raised when a node is selected.
You can selectively override the TreeNodeBinding.SelectAction property by setting the TreeNode.SelectAction property of each node directly.
The following table lists the available options.
TreeNodeSelectAction.Expand |
Toggles the node between expanded and collapsed. Raises the TreeView.TreeNodeExpanded event or the TreeView.TreeNodeCollapsed event, as appropriate. |
TreeNodeSelectAction.None |
Raises no events when a node is selected. |
TreeNodeSelectAction.Select |
Raises the TreeView.SelectedNodeChanged event when a node is selected. |
TreeNodeSelectAction.SelectExpand |
Raises both the TreeView.SelectedNodeChanged and TreeView.TreeNodeExpanded events when a node is selected. Nodes are only expanded, never collapsed. |
The TreeView.HoverNodeStyle is not rendered for a node with its TreeNode.SelectAction property set to TreeNodeSelectAction.None.
The value of this property is stored in view state.