DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: TreeView

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    TreeView

    [Originally posted by scobra98]

    Hello,

    I m trying to put the data into TreeView Control but not avail.

    I want to put that if a customer has some Invoices the Customer name will the parent node and all invoices related to that customer will child node.

    Please help me
    Thanks
    Farooq

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:TreeView

    [Originally posted by Steve]

    Sub BuildTree

    Dim strNodeKey as string
    Dim strNodeText as string
    Dim NodeParent as Node
    Dim NodeChild as Node

    loop through the customer list

    strNodeKey = "L1" & customer_ID
    strNodeText = customer_Name

    set NodeParent = TreeView.Nodes.Add(, , strNodeKey, strNodeText)

    loop through each invoice for the customer

    strNodeKey = "L2" & invoice_Number
    strNodeText = invoice_Number & invoice_Date

    set NodeChild = TreeView.Nodes.Add(NodeParent.Index, tvwChild, strNodeKey, strNodeText)
    end loop
    end loop

    end sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center