By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,596 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,596 IT Pros & Developers. It's quick & easy.

How to load hierarchical Db data in treeview??

P: n/a
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)
Feb 17 '06 #1
Share this Question
Share on Google+
2 Replies


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

Hope this helps
Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Don" <don81846@NO_CaCa.Earthlink.net> schreef in bericht
news:q8********************************@4ax.com...

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)

Feb 17 '06 #2

P: n/a
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

Don wrote:
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)


Feb 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.