Click or drag to resize
KaxTreeViewSelectedNode Property
Gets a KaxTreeNode object that represents the selected node in the KaxTreeView control.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public KaxTreeNode SelectedNode { get; }

Property Value

Type: KaxTreeNode
Remarks

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.

Examples
[New Example]
<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
[New Example]
<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;
}
See Also