multiple DataSource TreeView

multiple DataSource TreeView

Old forum URL: forums.lhotka.net/forums/t/4281.aspx


praevsky posted on Saturday, February 02, 2008

TreeViews are a natural choice for application navigators.  SSMS, Visual Studio and the Windows Explorer come to mind.  Most relational data is hierarchical.
I'm trying to solve the general problem of navigating a database application using a treeview.  I have had great luck finding useful software and strategies for developing software using the 'google', but this problem has me stymied. 
What I would like is to have a separate class of treenode for each CSLA business object, and each treenode loads it's own children.  All the examples I have found so far are either for 'single table' data models, or data models where 'node.depth' identifies the table.
It would be useful to have multiple DataSources in the same tree.
In Java, we used MutableTreeNodes.
Does anyone have a have an example of subclassing Treeview and TreeNode?
I'm interested in both System.Windows.Forms and System.Web.UI.WebControls

Thanks

Copyright (c) Marimer LLC