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
860
Hide all total columns, rows and cells
posted

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?

Parents
No Data
Reply
  • 23930
    Verified Answer
    Offline posted

    Hello,


    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;
                    }
     };

    Please let me know if you have any addition questions.

Children