score:1

Accepted answer

score:0

You need to use the GroupBy function.

score:0

Please see this link. It uses an extension Method .AsHierarchy() to represent Hierarchical data

http://www.scip.be/index.php?Page=ArticlesNET18#AsHierarchy.

The returned object would be in tree structure. You just then have to decided on your presentation logic(space for each child node)

score:0

You can build a simple set of Html in your action code assign specific values of your HTML that you build dynamically in your Action with values you get by using linq. Then on you view when you return it using viewdata render it as pure html and use jquery to create the tree here some good example of jquery tree plugin

http://mbraak.github.com/jqTree/


Related Articles