System.Web.UI.WebControls.TreeNodeBinding.SelectAction Property

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.

Syntax

[System.ComponentModel.DefaultValue(System.Web.UI.WebControls.TreeNodeSelectAction.Select)]
public TreeNodeSelectAction SelectAction { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

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.

Note:

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.

Note:

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.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0