Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
What event is fired when you collapse a group by clicking on '-' sign in the header?
posted

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.

  • 8831
    Suggested Answer
    posted

    Hello,

    You can look at these:

    XamPivotGrid.AxisExpansionChanging
    XamPivotGrid.AxisExpansionChanged

    Then 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.