Hello
I dont want any of the total columns to be shown on my XamPivotGrid (using FlatDataSource). How do I control visibility of those?
Ive tried TotalRowStyle & TotalColumnStyle, which could hide the cells, but not he columns.
Any advice?
Hello,
Thank you for the reply.
Those are the hidden axis choosers of the pivot grid. You can hide them by setting their background to “Transparent” by applying a style like this:
<Style TargetType="{x:Type ig:HiddenAxisChooser}">
<Setter Property="Background" Value="Transparent"></Setter>
</Style>
Please let me know if you have any addition questions.
Thanks for your promt response.
It work, or at lease almost. After hiding the totals, I see some strange "stribes" around the row selector. See screenshot.
Any idea how to remove those?
Thank you for posting in our forums.
You can use the LayoutUpdated event for the pivot grid in order to hide all the total rows and columns. Please refer to this sample code in order to see how to achieve this:
pivotGrid.LayoutUpdated += (s, args) =>{ foreach (PivotDataColumn c in pivotGrid.DataColumns) { c.IsVisible = c.IsTotal == false; } foreach (var r in pivotGrid.DataRows) { r.IsVisible = r.IsTotal == false; } };