Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Binding XamDataGrid to ObservableCollection with an object as one of its properties
posted

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://es.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.

-------------------------------------------------------

Replied On: 08-06-2012 4:55 PM More Reply
Stefan,

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.

Grid_Child_Tabs_Modified.rar