Results 1 to 2 of 2

Thread: [2005] Tree

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    [2005] Tree

    Hi,

    I have to populate the tree with fixed filed in Tree i.e
    Grand, Parent, child, GrandChild, GrandChildNo, Name.
    Tree will be : Main Tree - Grand Nodes - Parent Nodes - Child Node -
    Grand Child Nodes -GrandChildNo.- Names (leaf)
    (If Grand Child is Y than create a node of child name and pupolate
    the name under that node. and Double click event will fire in case of leaf click)
    ex:
    -Tree
    |
    |-M
    ||
    ||+M
    ||-T
    | |_C
    | |-D
    | | |-D1
    | | |-D2
    | |-E
    |+S

    I attched my code (vb 2005) with database (access 2000). Pls check the code and
    guide how to achive the result.


    thanks
    Attached Files Attached Files

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] Tree

    Hi,

    To add newnodes to your treeview, you can try this:

    Code:
    ' Adds new node as a child node of the currently selected node.
    Dim newNode As TreeNode = New TreeNode("Text for new node")
    TreeView1.SelectedNode.Nodes.Add(newNode)
    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width