Hi,
I am trying to bind an ObservableCollection to the XamDataGrid. The class of the ObservableCollection has child ObservableCollection and also property of type another class. The child collection is shown as hierarchy, which is fine, but I can't get to bind the properties of the child object. I did find a thread here (http://ko.infragistics.com/community/forums/p/59650/366342.aspx#366342), which helped me to a certain extent but not entirely. I posted a reply on the thread but no response yet, may be because the thread is an old one. Below is the post for reference and attached is the modified sample code (originally posted by Stefan).
Any help in this regard is highly appreciated. Thanks.
-------------------------------------------------------
I have a similar situation and your example helped to a certain extent. However, it fails in a certain scenario. I have modified your solution to reproduce my situation. I have added another class to the Person object and I need to display the "Height" field at the parent row level.
Attached is the modified code. It'll be great if you can help on this. Also, I added a "Number" property to the Cars class. Though the field is displayed correctly, I failed to understand how? Does XamDataGrid compare the rest of the fields to see what collection the FieldLayout belongs to ?
Thanks for your help.
Any updates on this please? I am sure its a simple thing, but not able to figure this out. I have tried a few options and none seem to work. Kinda important & urgent as it's holding up my work.
Thanks in Advance.
Hello,
I have been looking into your questions and if you would like to present hierarchical data in XamDataGrid, you need to define every new field layout as a field of the previous one. I am attaching a sample application(DataGridHierarchy.zip) which shows this functionality.
If you have an object, which property you would like to use as a Field of the XamDataGrid, I can suggest you use UnboundField like e.g. :
<igDP:UnboundField Label="Location" BindingPath="Family.Location"/>
If you need any further assistance on this matter, feel free to ask.
Thank you Yanko Nikolov. That worked.