Suppose there are three columns in the XamDataGrid: Year, Location and Donkey. At the moment, when I pull up the header from any of these to the upper part, I get the grouping done automagically, which is great. When I pull up a second header, the gouping gets nested, which is even more great.
However, since the nesting is so clearly specified, I feel that there's no need to list the values of the column that is used for grouping - after all, it only contains one and the same value on all the lines. That's unnecessary.
How can I format my XAML (or what methods do I need to override) to only get the donkeys, if the grouping by year and location is active?
You can set the CellVisibilityWhenGrouped on the Settings of the fields for which you want to do that. e.g.
<igWpf:XamDataGrid BindToSampleData="True"> <igWpf:XamDataGrid.FieldLayouts> <igWpf:FieldLayout> <igWpf:Field Name="name"> <igWpf:Field.Settings> <igWpf:FieldSettings CellVisibilityWhenGrouped="Collapsed" /> </igWpf:Field.Settings> </igWpf:Field> </igWpf:FieldLayout> </igWpf:XamDataGrid.FieldLayouts></igWpf:XamDataGrid>
It seems to work for a single column, so the issue can be said to be resolved. However, I noticed that when I putCollapseon one column andHiddenon another one, the latter seems to be unaffected. Putting both onCollapseyielded the expected result, though. Not sure if it's a bug or just intended, if not intuitively expected, feature.