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
 
Ad

Advertisements


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

Top