Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i need to implement Tree View in asp.net dynamically where nodes information is coming from database in Master-Detail relationship.

I have done this by iterating all the rows coming from database and added node in tree view its working fine.

But i want to achieve this thing by using OOPS.

I am thinking in this way.

1) i want to create a collection of nodes and want to bind this collection with treeview.
Such that i can use this collection later on .

I am confused how can i achieve this by using classes and objects.

Any help will be appreciated.
Posted

1 solution

You can check around the composite design pattern which is useful for tree structure / hierarchical representations. There are lots of references available online like http://www.dotnet-tricks.com/Tutorial/designpatterns/XSN6130713-Composite-Design-Pattern---C[^]
which you can read through.

Hope it helps...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900