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
420
Detect when a customization has been made
posted

Hi,

what event do i need to handle to know when a user has made ANY customization to the pivot grid  (e.g. dimension added, re-ordered, etc).

Thanks,

Phil

  • 7922
    Verified Answer
    posted

    Hi

    The best way is to subscribe for CollectionChanged event of pivot grid datasource for the area you are interested in. See example below.

    public MainWindow()
    {
        InitializeComponent();
        pivotGrid.DataSource.Columns.CollectionChanged += Columns_CollectionChanged;
        pivotGrid.DataSource.Rows.CollectionChanged += Rows_CollectionChanged;
        pivotGrid.DataSource.Measures.CollectionChanged += Measures_CollectionChanged;
        pivotGrid.DataSource.Filters.CollectionChanged += Filters_CollectionChanged;
    }