Mar 28, 2014, 4:20 PM
[CLOSED] HOW TO select a TreeNode of a TreePanel in code-behind - EXT.NET 2.4.x
Hello,
I'm using EXT.NET 2.4.0.28408 and i'm building a tree in vb code-behind.
Here's the ext tree panel:
Thank you in advance.
I'm using EXT.NET 2.4.0.28408 and i'm building a tree in vb code-behind.
Here's the ext tree panel:
<ext:TreePanel ID="charTree" runat="server" Width="300"
Height="550"
Icon="BookOpen"
Title="Elements"
AutoScroll="true">
<Root>
</Root>
<BottomBar>
<ext:StatusBar ID="StatusBar1" runat="server" AutoClear="1500" />
</BottomBar>
<Listeners>
<ItemClick
Handler="#{StatusBar1}.setStatus({text: 'Selected Node: <b>' + record.data.text + '<br />', clear: false});"
/>
<ItemExpand
Handler="#{StatusBar1}.setStatus({text: 'Expanded Node: <b>' + item.data.text + '<br />', clear: false});"
Buffer="30"
/>
<ItemCollapse
Handler="#{StatusBar1}.setStatus({text: 'Collapsed Node: <b>' + item.data.text + '<br />', clear: false});"
Buffer="30"
/>
</Listeners>
</ext:TreePanel>
Here's the code-behind in vb.net:Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim root As New Ext.Net.Node
Dim children As String() = {"a", "b", "c"}
root.Text = "Alphabet"
charTree.Root.Add(root)
For Each c As String In children.ToList
Dim node As New Ext.Net.Node
node.Text = c
node.Icon = Icon.Add
node.Leaf = True
root.Children.Add(node)
Next
End Sub
The problem is that I'm trying to select a node in this tree panel, for example node with assigned text "b", and, simply, I'm not able to do it: how to?!? Thank you in advance.
Last edited by Daniil; Apr 09, 2014 at 1:37 AM.
Reason: [CLOSED]