dano
May 20th, 1999, 01:40 PM
I have an Item object that can be "part of" of another Item object - the "bill of material" problem.
I have a collection class called Items that contains the collection of Item objects that repressent the "Item Configuration" tree. Each Item object contains a property called ParentItem (of type Item) that references another Item in my Items collection. The Items collection is populated with an "Open" method which retrieves persisted values from the DB.
I am looking for an elegant way to populate the treeview control using my Items collection class as the source of the data (or better yet have the TreeView control reference my Items collection for its display of data).
I have seen (and implemented) examples of recursive routines using an ADO recordset object to populate the treeview control, but have been unable to find similar examples using the Collections' class.
I'm currently working on these routines but would appreicate hearing from others to see how they have implemented the storage and display of tree structures using the VB Collections class and TreeView control.
I have a collection class called Items that contains the collection of Item objects that repressent the "Item Configuration" tree. Each Item object contains a property called ParentItem (of type Item) that references another Item in my Items collection. The Items collection is populated with an "Open" method which retrieves persisted values from the DB.
I am looking for an elegant way to populate the treeview control using my Items collection class as the source of the data (or better yet have the TreeView control reference my Items collection for its display of data).
I have seen (and implemented) examples of recursive routines using an ADO recordset object to populate the treeview control, but have been unable to find similar examples using the Collections' class.
I'm currently working on these routines but would appreicate hearing from others to see how they have implemented the storage and display of tree structures using the VB Collections class and TreeView control.