473,503 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to load hierarchical Db data in treeview??

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
2 5854
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1788
by: jayson_13 | last post by:
Hi, I want to retrieve the hierarchical structure which is store inside the database and then display it using treeview control. But now I got a design issue which I hope that you guys can help...
1
1852
by: Neil McGuigan | last post by:
Hi, I want to store product categories in my db and am a little lost as to where to start. They can be hierarchical, such as "Books" > "Cook Books", so my table is like this: int...
3
2022
by: Bennett Haselton | last post by:
I want to display a hierarchical listing of items from a database table, where, say, each row in the table has an "ID" field and a "parent_id" field giving the ID of its parent (NULL if it's at the...
14
15050
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
5
2651
by: Kent Boogaart | last post by:
Hi, I have some hierarchical data (FAQs) that I would like to bind to. The basic structure is: FAQ Category + Categories + FAQs So an FAQ category has any number of sub-categories and any...
2
2928
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
2
1519
by: Olav | last post by:
I need a control to display a hierarchical tree of data and each node in the tree should have a checbox to select / unselect that part of the tree. Selecting / unselecting a top node should select...
0
1280
by: Adam Right | last post by:
Hi ! I have a hierarchical field (from database with a DataReader) , every 3 digit must stand for a node in a TreeView item for windows application Sample collocation is ......
4
4360
by: Marco Pais | last post by:
Hi there. I am trying to find th best way (best UI control) to present hierarchical data, nested tables. For example, I have a Employees table (id, name) and EmployeesSales (id, idEmp,...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.