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
500
xamPivotGrid events
posted

I am trying to port my OLAP reports from a previously used tool to an application using your xamPivot controls. I have eventually managed to get by initial problems having had much help from your examples. However there is one vital task that I can not manage to figure out. I need to have an event notifying me when items have been added or removed from filter dimensions. By using your examples I have been able to implement the event fired when dimensions are added/removed from the filter collection (pivotgrid.DataSource.Filters.CollectionChanged), but I need to know when the operator changes visible/hidden elements in each filter.  

 

 

 

 

 

  

Parents
  • 7922
    Suggested Answer
    posted

    Hi

     

    If you mean to listen when some check box is checked or unchecked you can use code below:

    // get the filter dimension
    IFilterViewModel fvm = PivotGrid.DataSource.Filters[0] as IFilterViewModel;
    // FilterMembers is hierarchycal item for populating the filter tree
    fvm.FilterMembers[0].PropertyChanged += 
    new System.ComponentModel.PropertyChangedEventHandler(MainWindow_PropertyChanged);

     void MainWindow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
    {
       if (e.PropertyName == "IsSelected")
       {
           //do something here
        }
    }

     

    Regards

    Todor

Reply Children