Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb_dotnet thread: Binding an object hierarchy to a tree view (suitable design pattern)?


Message #1 by "Padgett Rowell" <padgett@i...> on Fri, 12 Apr 2002 16:59:29 +0800
I'm sure I saw this somewhere as I was reading.  For now, all I can find 
is MS KB article Q308063.  I will keep my eye out for more/better 
examples.

R

> R,

Do you have any samples for binding a dataset to a tree control?  I
didn't know this was possible.  My data is stored in XML, if I could
bind to that, I'd be laughing.

Padgett

-----Original Message-----
From: RL Cornish [mailto:rlcornish@c...] 
Sent: Saturday, 13 April 2002 2:28 PM
To: pro_VB_dotnet
Subject: [pro_vb_dotnet] Re: Binding an object hierarchy to a tree view
(suitable design pattern)?

I would investigate trying to hydrate a DataSet out of your data.  You 
might be able write semi-generic code to do this.  Add each level as a 
table and then add the parent-child (collection) levels as Relations.  
Then you have your auto-sync handled.

R 

I have an object hierarchy similar to:

Store
  |--	Products
  |--	Customers
  |--	Suppliers

The Store is a singleton object and the products, customers and
suppliers are all collection classes. Does anyone know of, or can
suggest a method to bind this object hierarchy to a tree?  Ideally, each
collection would become a folder, and each item in the collection would
be an individual node.  Being able to populate the tree (from the parent
object 'store') to n levels deep dynamically would also be a bonus.

Failing being able to directly bind the tree and the object hierarchy,
can anyone suggest a design pattern that could be used to synchronize an
object hierarchy to the tree so that all updates to the objects would be
immediately reflected on the tree?

Cheers,

Padgett Rowell


---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to



  Return to Index