Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tree view control
Message
From
02/05/2005 15:05:41
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Tree view control
Miscellaneous
Thread ID:
01010269
Message ID:
01010269
Views:
76
I am working on a treeview control with check boxs to display Folders and Files for an FTP program to use as its selection and have 2 problems.

1.) I want to be able to check all child nodes when a parent node is checked, however using the code below I must expand all nodes to get it to work. So the code below works but isnt very appealing.
  Private Sub DirectoryTreeView_AfterCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles MyBase.AfterCheck
      
            ' for some reason I have to Expand all child nodes to get them checked
            e.Node.ExpandAll()
            Dim onode As TreeNode
            For Each onode In e.Node.Nodes
                onode.Checked = True
            Next
        End If
   
2) Is there a method to tell what has been checked similar to the checked list box? I would hate to have to loop through the entire treeview to check for checked :)

I appreciate any help

Paul
Next
Reply
Map
View

Click here to load this message in the networking platform