How to load hierarchical Db data in treeview??

D

Don

In a previous version of vb I used to save and load hierarchical data
from an Access db into a treeview. But, I never found a very
satisfying or elegant way to do it. I used a flat file approach with
each item having a reference to its parent node. I would then start
by loading the top level nodes folowed by loading child node data only
as their parent node was expanded.

This method worked fairly well except that allowing the user to drag a
node from one parent to another meant having to update the record's
parent and hope you could catch any boogers that may occur.

Loading child nodes as needed works just fine but is there a better
way to do all this hocus pocus with vb.net 2003? I've started to learn
vb.net about 13 times over the last few years but have not put much
time into it.

Thank you for any non profane help, <g>

Don

(Just kidding about the @#$% profanity)
 
P

Peter Proost

Hi, do a search on this group with google on "treeview recursive loop"
this should get you started

Hope this helps
Greetz Peter
 
G

Grant Frisken

If you are open to commercial solutions take a look at Infralution's
Virtual Tree control. It has a really elegant databinding mechanism
that allows you to bind easily to hierarchical data from a Database.

You can get more information and download a fully functional evaluation
version from:

www.infralution.com/virtualtree.html

Regards
Grant Frisken
Infralution
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top