Hello community!
I have a problem with displaying hierarchical data which I retrieve from a database. For the example app I have built a simpler example:
MyComponent has a list of ComponentToMaintenance (1:n)ComponentToMaintenance has an ID, and references MyComponent and MaintenanceTask. ComponentToMaintenance resolves the (M:N) relation between MyComponent and Maintenance TaskMaintenanceTask references MaintenaceInterval (n:1)
I load the object structure into an observable collection. The content is displayed in the grid including the '+' as indicator that child entries could be found. If I click on the expansion sign, I see the list with the correct amount of the child entries. The problem is, that the property values are not displayed for the child entries.
Attached please find the sample solution "GridProblemChildGrandChild.rar".
In the project "GridViewProblem.Shared\DataClasses" you find the classes for my datastructure. In "GridViewProblem\ViewModel" I create the data in the method "GenerateTestData" Thank you for your help.
Hello,
In order to display the properties in the objects, My Component and Maintenance Task, within the child rows you can use an UnboundField and set the binding path to <objectname>.<propertyname>. For example:
<igDP:UnboundField BindingPath="AssignedComponent.ComponentID" Label="Component ID"/>
Please see modified sample.
Let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Hello Valerie!
Thank you for the modified sample.
But I am still having problems in my current project. Attached please find a screenshot of the gird and the child list. I have 5 items in my child list. In the grid, I see that 5 rows are inserted, but nothing is displayed.
I have removed all Layout Settings and Styles and suppresed events. I added the "AssigningFieldLayoutToItem Event to check my data structure. There I see, that the elements are in the list with the correct values, but I dont get the values on the screen within the grid.
Do you have a hint for me what I could check?Thank you for your help