KaxTreeViewSelectedNode Property |
Namespace: Kettic.AspNet.Controls
When a node is in selection mode, the user can select a node by clicking on the text in the node. Use the SelectedNode property to determine which node is selected in the TreeView control.
A node cannot be selected when the TreeView control displays hyperlinks. When hyperlinks are displayed, the SelectedNode property always returns a null reference (Nothing in Visual Basic).
When the user selects a different node in the KaxTreeView control by clicking the text in the new node, the NodeClick event is raised, by default. If you set the MultipleSelect property of the treeview to true, end-users can select multiple nodes by holding the Ctrl / Shift keys while selecting.
<kaxT:KaxTreeView ID="KaxTree1" runat="server" OnNodeClick="NodeClick" /> Protected Sub NodeClick(ByVal sender As Object, ByVal NodeEventArgs As KaxTreeNodeEventArgs) info.Text = String.Empty Dim NodeClicked As KaxTreeNode = NodeEventArgs.NodeClicked info.Text = NodeClicked.Text End Sub
<kaxT:KaxTreeView ID="KaxTree1" runat="server" OnNodeClick="NodeClick" /> protected void NodeClick(object sender, KaxTreeNodeEventArgs NodeEventArgs) { info.Text = string.Empty; KaxTreeNode NodeClicked = NodeEventArgs.NodeClicked; info.Text = NodeClicked.Text; }