Hi,
I'm using the XamDataGrid with hierarchical data as datasource so i get this output:
Parent1 Col1 | P1 Col2 | P1 Col 3
+ Child1 Col 1| C1 Col 2 | C1 Col 3
+ Child2 Col 1| C2 Col 2 | C2 Col 3
Now i'm looking for a way to display parent and child in the same row to see something like this:
Parent1 Col1 | P1 Col2 | P1 Col 3 | C1 Col 1| C1 Col 2 | C1 Col 3
Parent1 Col1 | P1 Col2 | P1 Col 3 | C2 Col 1| C2 Col 2 | C2 Col 3
Is there a way to achieve this without manually combine parent and child in one datatype?
Thanks for your help.
- Bastian
Hi Bastian,
I have logged a Feature Request for this (FR12954) with Product Mangement. This question came up in one of my prior support cases, and the suggestion I got from our developers was the following.
Try setting the Field’s IsExpandable property to false and then set its Field.Settings.CellValuePresenterStyle to a style with a template for that field to display the child data horizontally. You could try putting a ListBox in the template that uses a horizontal stack panel.
This approach worked well for the customer I was working with, although I do not have a sample implementing this myself.
If I can be of furhter assistance, please let me know.
Thanks,
Hi Francis,
thanks for logging the Feature Request.
In our case this approach won't work because we need the filtering and sorting of the grid for all field's. So I think I'm goint to to combine the parent and the child to an anonymous type in my query and wait for the result of the Feature Request.
Thanks,Bastian