System.Web.UI.WebControls Namespace TreeNode Class
.NET Framework version 2.0
Sets or retrieves the event or events to raise when a TreeNode is selected.
Inline |
<asp:treeview selectaction = enumValue ... > |
Script |
[ TreeNodeSelectAction enumValue = ] TreeNode.SelectAction |
This property can only be used programmatically; it cannot be set when declaring the control.
The property is read only with a default value f Select.
Use the SelectAction property to specify which event or events are raised when a node is selected.
The text of a node in a TreeView control can be in one of two modes: selection mode and navigation mode. A node is in navigation mode when the NavigateUrl property for the node is set to a value other than an empty string. Otherwise, the node is in selection mode, wherein the user can select a node by clicking on the node text.
When a node is in navigation mode, selection events are disabled for that node. Clicking a node will direct the user to the specified URL, rather than posting the page back to the server and raising an event.
NOTE: This property applies only when a node is in selection mode.
When the user selects a different node in the TreeView control, the SelectedNodeChanged event is raised by default. The TreeView supports specifying a different event to be raised, based on the setting of the SelectAction property. The following table lists the available options.
NOTE: The HoverNodeStyle is not rendered for a node with its SelectAction property set to None.
TreeNode Members