Building TreeView from Table

Building TreeView from Table

Post by Frank Hofma » Sun, 09 Mar 1997 04:00:00



Hi folks!

Does anybody have a routine which reads the following correctly
into a treeview?

  ID(+)   Parent(Integer)  Code(ascii)
   1            0               test
   2            1               test2
   3            4               test3
   4            0               test4
        .
        .
        .
        .
        .

TIA
Frank

 
 
 

Building TreeView from Table

Post by David Cron » Wed, 12 Mar 1997 04:00:00



says...

Quote:> Does anybody have a routine which reads the following correctly
> into a treeview?
>   ID(+)   Parent(Integer)  Code(ascii)
>    1               0               test
>    2               1               test2
>    3               4               test3
>    4               0               test4

  I'm currently working an component tentatively named "TDBTreeView" which
will do the above.  The BETA version will soon be available at:

        http://www.ualberta.ca/~dcronin/Delphi.html

---
David Cronin
http://www.ualberta.ca/~dcronin

 
 
 

Building TreeView from Table

Post by Paul Bartlet » Thu, 13 Mar 1997 04:00:00


There is a component, DBTree32, available on the Delphi Super Page from
Russian Systems Developers that does just this.  They also provide a Data
Aware package called Auto32 that is worth checking out.  A DBTree for
Delphi 1.0 would be nice.




> says...
> > Does anybody have a routine which reads the following correctly
> > into a treeview?
> >   ID(+)   Parent(Integer)  Code(ascii)
> >    1          0               test
> >    2          1               test2
> >    3          4               test3
> >    4          0               test4

>   I'm currently working an component tentatively named "TDBTreeView"
which
> will do the above.  The BETA version will soon be available at:

>    http://www.ualberta.ca/~dcronin/Delphi.html

> ---
> David Cronin
> http://www.ualberta.ca/~dcronin

 
 
 

Building TreeView from Table

Post by Harry Bos » Fri, 14 Mar 1997 04:00:00




Quote:>Does anybody have a routine which reads the following correctly
>into a treeview?

I've seen a set of such components on the Delphi Super Page.

Harry

Anansi, a freeware project-centered HTML-editor:
http://www.xs4all.nl/~hbosma/anansi/index.html

 
 
 

Building TreeView from Table

Post by Thomas M. Schmic » Mon, 24 Mar 1997 04:00:00


I think you will have a problem when the Parents-Record is after the=20
Childs-Record, as you=20
mentioned it in your example. You should be sure to sort it correctly.=20
Also you have 2 Nodes who have as Parent 0, you should establish one=20
ROOT-Node (Number 1) and=20
all others should have a Parent-Field >=1. (I think, this will make it=20
easier)=20
=20
When you did so, simply take an empty TTreeView, Move to the first=20
Record, Create the first TTreeNode.=20
Then go to the next Record, and Add the next TTreeNode and so on.=20
=20
If you look in the Help for TTreeView, TTreeNode and TTreeNodes, you=20
will find a plenty of Methods and=20
Properties to do so.=20
=20
Perhabs you can also go the other way to write to the Table the correct=20
records if the user inserts new =20
Nodes to the treeview or deletes some nodes.=20
=20
Hope this helps.=20
=20
Thomas=20

 
 
 

1. Building a TreeView with DB contents

Hi!
Has anyone build a TreeView using hierarchical struktures
from a DB (for example with a product structure of a retailer)?
Perhaps someone developed somthing like this an posses an sample java
code or an idea, how to solve the problem.
Im using Visual Cafe for Java 2.0 Database Development Edition.

---------------------
 Guido Keeve

2. OO4O & C++ : COM or class library?

3. Building an exe containing a Treeview.

4. I/O error during ONUNLOAD --Please HELP !!!

5. Query recursive table for treeview

6. Paradox errors in Delphi

7. Display Access table using Treeview Control (VB5-SP3)

8. The Key To Organizing Your Health Records

9. Using a Treeview to List Tables & Fields

10. Query recursive table for treeview

11. i want to know how to populate a treeview from a table

12. Displaying table data (Access) with treeview control (VB5-SP3)

13. load table into a treeview