Results 1 to 3 of 3

Thread: [RESOLVED] Treeview default expand

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2012
    Posts
    46

    Resolved [RESOLVED] Treeview default expand

    Hey all, I was wondering if any know's how I can set a default view for a treeview. meaning I have a treeview created and has some data in it. when the page first loads it just shows the treeview. I need to actually display the very first node's data. So i have the treeview, with a parent node and 3 child nodes. I need to dynamically get the the parentnode and then get the first child node and display that data without clicking. I could just hard code the path in, but since this is still in development more nodes will be added and there for the order could change.

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Treeview default expand

    after you get the parent node... set its Expanded property to true... that should do the trick.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2012
    Posts
    46

    Re: Treeview default expand

    Yeah thanks tg, thats pretty much all I was missing, turns out someone had wrote some code for it already, it was just never really used for that purpose. So with some creative calls and such I was able to get working, expanding was the last thing I did, I could have done expandall() but that would have expended every node in the tree, right now that is not such an issue, but as nodes are added it would have been a mess I think.

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