Results 1 to 3 of 3

Thread: Treeview

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    93
    Could anyone pass on any advice or experience on the best and fastest methods of populating a treeview control?

    I don't want to read in the entire tree data initially and populate the entire tree, however I would prefer to populate it only as a node is expanded.

    On top of that the most important things is that even though a node hasn't been expanded yet I want to have the "plus" sign show that there are children.

    I have been doing this up to know by changing an icon that I use against each node, however I want to set the "plus" symbol in the treeview lines.


  2. #2
    Guest
    It all depends on where the data for the treeview is coming from. Otherwise, it's jsut a striaght Nodes.Add approach.

    Ideally, you need the data in a hierarchical format to make life easy, and ideally the hierarcy needs to haveth ability to loop trhoug hchild nodes and through nodes on the same level.

    to add a plus sign, you need to create a dummy node, then on the clikc event of the item, remove the dummy node and add the data required as the children.

    That will effectively give you staged loading which is heaps faster than loading the whole data set at once

    - gaffa

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    93
    Hey, thats it!!! Exactly what I was looking for...and it worked!!

    Thanks

    Any chance you know how to modify the vertical spacing between nodes? I can't seem to find a property to allow this.

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