Within a XamDataGrid, is it possible to hide the headers of child nodes, so that we have one header only for the entire tree?
I'm using AutoGenerated="False" and the dataset is homogeneous therefore a single FieldLayout
Hello Patrick,
I have been investigating into the ability to do this with a homogenous data source in the XamDataGrid, and it is possible to do this. In order to do so, I would recommend creating a secondary FieldLayout that has its Settings property set to a new FieldLayoutSettings object with the LabelLocation property set to “Hidden.” Since your data is homogenous though, I would recommend using the AssigningFieldLayoutToItem event of the XamDataGrid so that you can catch when your data items are being assigned to a particular FieldLayout, and assign it to the correct one.
I am attaching a sample project to demonstrate how this can be done. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
XDGHomogenousDataTest.zip
Thank you - I see that this would be a good solution. Unfortunately we have largely customized the XamDataGrid for a specific project. Switching to XamTreeGrid has a few undesirable effects. Is there anyway to hijack the XamDataGrid to suppress any header that is not the first? If there is no way to do so, I will work on using the XamTreeGrid
Being that you have a homogenous data set and are only using a single FieldLayout, I would instead recommend that you use the XamTreeGrid instead of the XamDataGrid. These controls are essentially the same in functionality, but the XamTreeGrid is designed for homogenous data and lays out your data in a tree-like structure where the headers only appear at the parent level by default.
You can read more about the XamTreeGrid here: https://es.infragistics.com/help/wpf/xamtreegrid