dynamically created nodes does not fire OnSelectedNodeChanged

S

skedward

Dear Sir,

I would like to check if the dynamically load nodes can still fire th


onselectednodechanged. Even if I changed to SelectExpand, it still doe
not work. My code

is as follows. Please help. Thanks.



best regards,

Edward



<ASP:TreeView id="TreeView1" OnTreeNodePopulate="TreeNodePopulate"

OnSelectedNodeChanged="TreeNodeSelectedNodeChanged" ExpandDepth="0
EnableViewState="false"

Visible=False ShowLines="true" runat="server"></ASP:TreeView>

Sub TreeNodeSelectedNodeChanged(ByVal sender As Object, ByVal
As EventArgs)
Value = TreeView1.SelectedNode.Value
Text = TreeView1.SelectedNode.Text
TreeView1.Visible = False
End Sub
Sub TreeNodePopulate(ByVal sender As Object, ByVal e A
TreeNodeEventArgs)
SetDV()
Dim nodes As DataView = GetChilds(DV, e.Node.Value)
' Populate Treeview.
For Each row As DataRowView In nodes
Dim newNode As New TreeNode()
newNode.Text = row("description").ToString()
newNode.Value = row("code").ToString()
'If Not IsNumeric(newNode.Value) Then
newNode.SelectAction
TreeNodeSelectAction.SelectExpand
newNode.PopulateOnDemand = True
'End If
e.Node.ChildNodes.Add(newNode)
'AddChild(DV, headNode)
Next
End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top