I have an asp.net backend that creates Hierarchical Data based on IHierarchicalEnumerable.
This was used for custom Hierarchical Data Controls in ASP.NET WebForms for sitemaps etc. We are now using ASP.NET MVC and am looking to use the same Hierarchical Data Collection with jQuery / Json etc.
How can I display Hierarchical Data using IHierarchicalEnumerable?
Is it possible (or a good idea) to return the IHierarchicalEnumerable as a JsonResult and iterate through this jQuery or should we just iterate through this within the view? Any Ideas on which one is better and how to do this?
Added:
Ideally we want to render say a treeview via Json/Ajax, so that would need to be a jQuery recursive approach if the object (IHierarchicalEnumerable ) is supported, not sure how efficient this would be though. Thinking an alternative approach to IHierarchicalEnumerable might be worth investigating...