Results 1 to 25 of 25

Thread: [RESOLVED] Loading GrandChildNodes from DB

Threaded View

  1. #3

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Loading GrandChildNodes from DB

    Right, with this code, added after the Childnodes are added, I am now getting what is shown in the image, but I am now stumped.

    There should only be 2 entries, not a third empty one, and they are supposed to be the next level in!

    vb Code:
    1. 'if no Child node, is there a grandchild node
    2.         If strNodeChild = "" Then
    3.             If strNodeGrandChild <> rs.Fields("tvwGrandChildNodes").Value & "" Then
    4.                 'if Fields is not empty - add new grandchild node
    5.                 strNodeGrandChild = rs.Fields("tvwGrandChildNodes").Value & ""
    6.                 .Nodes.Add "P" & CStr(lngNodeParent), tvwLast, , strNodeGrandChild, "Leaf"
    7.             End If
    8.         Else
    9.             If strNodeGrandChild <> rs.Fields("tvwGrandChildNodes").Value & "" Then
    10.                 'if Fields is not empty - add new grandchild node
    11.                 strNodeGrandChild = rs.Fields("tvwGrandChildNodes").Value & ""
    12.                 .Nodes.Add "C" & CStr(lngNodeChild), tvwLast, , strNodeGrandChild, "Leaf"
    13.             End If
    14.         End If
    Attached Images Attached Images  
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

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