Treeview Howto

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Toco

    #1

    Treeview Howto

    I have user selecting a branch on a treeview. Is it possible to gather the
    values of all child nodes of the selected node, and put the values into an
    arraylist? If you have any examples I would appreciate it.
  • Toco

    #2
    RE: Treeview Howto

    nevermind I figured it out

    http://msdn2.microsoft.com/en-us/library/wwc698z7.aspx

    "Toco" wrote:
    I have user selecting a branch on a treeview. Is it possible to gather the
    values of all child nodes of the selected node, and put the values into an
    arraylist? If you have any examples I would appreciate it.

    Comment

    • Jeff Gaines

      #3
      Re: Treeview Howto

      On 09/11/2006 in message
      <667E769D-37AE-43F6-8844-F41125E87FA6@mi crosoft.comToco wrote:
      >I have user selecting a branch on a treeview. Is it possible to gather the
      >values of all child nodes of the selected node, and put the values into an
      >arraylist? If you have any examples I would appreciate it.
      Something like this will pick up the first level nodes, if you want their
      children it would need to be recursive.

      ArrayList al = new ArrayList();
      TreeNode tnSelected = tv.SelectedNode ;

      foreach(TreeNod e tNode in tnSelected.Node s)
      al.Add(tNode);

      --
      Jeff Gaines

      Comment

      Working...