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
mankandev,
Please provide more details on what you are looking for. From your description of "I need to group it in 2 levels in a row" I am not sure if it matches what I have provided above or how to best answer your question.
Hi Alan,
In the solution you provided, for every child the parent will be repeated.I need to display parent cell displayed only once for all children, if possible through merged cells.ideally, the parent should not be displayed for each child.Is there a way to achieve this? I know there is an option in XAMGrid through merged cell grouping.but I am not using 11.2.Is there any other way to do this in xamdatagrid itself?
If you are looking to merge the cell that is created for the parent so that there is one cell for all of the children then your best option would be to upgrade to 11.2 and use the XamGrid as the XamDataGrid doesn't have the same cell merging functionality.
Can we upgrade the new version with the same registration key or should we go for new one?
The installer would require a different key than the previous version of NetAdvantage. If you had an active subscription when NetAdvantage 2011 Volume 2 was released then you would have been given a key at that time. If you didn't have an active subscription then you would need to purchase to get the newer key. Sales will be able to assist you with obtaining new keys if needed. You can email sales using sales@infragistics.com.
Let me know if you have any questions with this matter.