-
Apr 17th, 2012, 09:52 AM
#1
Thread Starter
Member
[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.
-
Apr 17th, 2012, 10:01 AM
#2
Re: Treeview default expand
after you get the parent node... set its Expanded property to true... that should do the trick.
-tg
-
Apr 17th, 2012, 10:24 AM
#3
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|