How to Auto Collapse in a Trree View?

  • Thread starter Luis E Valencia
  • Start date
L

Luis E Valencia

I have 7 root nodes I want to collapseIf I click on another root Node.

I tried this

Private Sub TreeView1_Expand(ByVal sender As Object, ByVal e As
Microsoft.Web.UI.WebControls.TreeViewClickEventArgs) Handles
TreeView1.Expand

Dim nodo As TreeNode

Dim nodoactual As TreeNode

Response.Write("HOLA")

nodoactual = CType(sender, TreeNode)

For Each nodo In TreeView1.Nodes

If Not nodo.Equals(nodoactual) Then

nodo.Expanded = False

End If

Next





End Sub



But it gets me a

Wating for an object! javascript error
 

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,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top