I have five objects that are related as follows<ObjectA> List<ObjectB></ObjectA>
<ObjectB> <ObjectC></ObjectB>
<ObjectC> List<ObjectD></ObjectC>
<ObjectD> <ObjectE></ObjectD>
<ObjectE></ObjectE>
I need to create a hierarchical XamDataGrid with a DataSource of ObjectA. Each object needs to expose its child object(s) as a hierarchical level (with an expansion control). Note that ObjectB contains a single instance of ObjectC not a collection (same with ObjectD). How do I do this?The only example I was able to find is this: http://ko.infragistics.com/community/forums/t/68994.aspx and I dont think it is exactly what I want. Hopefully someone has asked this before and I just dont know what to look for.
Thanks,
Sam
Hello Sam,
Thank you for your reply. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you Krasimir, your example is really helpful. Unfortuantely since I didnt see a response to my post I had to make a presentation class that that exposed child objects as collections.
Thank you for your email. I have been looking into the functionality that you have described and since you wish to display hierarchy, without having a collection property I can suggest the following approach: for each property that is a complex object and you with to display it as a hierarchy, you can use an UnboundField and set the Binding to binding to that property and set the Converter of the binding. In the Convert method of the converter, you can create a ArrayList, add the value in that ArrayList and return it. After doing so you can set the DataType of the UnboundField to ArrayList and the field will appear as hierarchy, without modifying the data to have collections. I have created a sample application for you, that demonstrates how you can implement this approach.
Please let me know if you need any further assistance on the matter.