| |||||||||||||||||||||
TreeView.SelectedNode PropertySystem.Web.UI.WebControls Namespace TreeView Class .NET Framework version 2.0 Returns a TreeNode object that represents the selected node in a TreeView control. Syntax
This property can only be used programmatically; it cannot be set when declaring the control. Property Value
The property is read only with no default value. RemarksUse the SelectedNode property to determine which node is selected in a TreeView control. 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 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.
ExampleThe following example demonstrates how to use the SelectedNode property to determine which node is selected in a TreeView control.
See AlsoTreeView Members SelectedValue Text Value |
| ||||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme