I'm trying to hide the totals columns when the groups are expanded and everything is good. When the group is expanded the following works
dataGrid1.LayoutLoaded += (s, args) => { foreach (PivotDataColumn c in dataGrid1.DataColumns) { if (c.IsTotal ) { c.IsVisible = true; } } };
but when the group is collapsed and only totals column is shown I cant capture the event to make the totals column visible.
Any ideas?
Thank you.
Hello,You can look at these:XamPivotGrid.AxisExpansionChangingXamPivotGrid.AxisExpansionChangedThen listen for ResultChanged event of the data source and try your code at that point because the change is processed in the backgound thread and ResultChanged is fired after XamPivotGrid.AxisExpansionChanged event.Plamen.