Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tree view control
Message
De
02/05/2005 15:05:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Tree view control
Divers
Thread ID:
01010269
Message ID:
01010269
Vues:
78
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform