Easiest way to convert IGrouping to IHierarchicalDataSource

I have a list of business objects that I want to display in a menu. I can quickly use LINQ to created nested groups to match the desired structure but have to manually iterate through each to instantiate and populate the menu items. I'm using the DevExpress ASPxMenu which supports IHierarchicalDataSource and IHierarchicalEnumerable. What's the easiest way for me to create convert my grouped list (as IGrouping) into one of these interfaces?


I had to do something similar for a hierarchical list from a database to display in a tree control. What I ended up doing was using LINQ2XML to create XElements as necessary to model the hierarchy, and then passing the top element to the tree control.

Need Your Help

Connecting interface builder to the code in Xcode 4

osx cocoa interface-builder

I created a new project in Xcode 4 using the "Cocoa Application" template and added a few UI elements as seen below:

Supporting Screen Sizes - DP not working

android android-layout android-screen-support

I've developed an interface and everything has used dp settings so I thought it should have been good for most screen sizes. However when testing it gets messed up on most screen sizes, bigger and

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.