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
324
XamPivotGrid 11.2 : Exception while DrillIng in during expansion
posted

Hi,

I recently upgraded my XamPivotGrid to version 11.2 and I am now running into some errors while trying to set expansion on the grid:

I have a method called DrillIn defined as follows:

  private void DrillIn(IFilterViewModel filterViewModel, IFilterMember filterMember)
        {
            manualResetEvent = new ManualResetEvent(false);

            //Condition to drill in further
            if (filterMember.Member.LevelDepth < LevelDepth && !(filterMember.Member.Members.Count == 1 && filterMember.Member.Caption == filterMember.Member.Members[0].Caption))
            {
                this.Dispatcher.Invoke(new Action(
                        delegate()
                        {
                            filterMember.IsExpanded = true;
                        }));

                if (filterMember.FilterMembers == null)
                    manualResetEvent.WaitOne();

                foreach (IFilterMember member in filterMember.FilterMembers)
                {
                    DrillIn(filterViewModel, member);
                }
            }
            else
            {
                this.Dispatcher.Invoke(
                    System.Windows.Threading.DispatcherPriority.Normal,
                    new Action(
                        delegate()
                        {
                            filterMember.IsExpanded = false;
                        }));

            }
        }

 

 

I now get the following exception:

CAUGHT: Object reference not set to an instance of an object./n   at Infragistics.Olap.FlatData.FlatDataSource.CreateFilterSource(IMember member, IFilterSource parentFilterSource)
   at Infragistics.Olap.DataSourceBase.RegisterFilterSource(IMember member, Int32 levelDepth, IFilterSource parentFilterSource)
   at Infragistics.Olap.DataSourceBase.RegisterFilterSourceHierarchy(IMember member)
   at Infragistics.Olap.DataSourceBase.RegisterFilterSource(IMember member)
   at Infragistics.Olap.FilterViewModelBase.GetMemberFilterSource(IMember member)
   at Infragistics.Olap.FlatData.FlatDataFilterViewModel.GenerateFilterMembers(IEnumerable`1 members, IFilterMember parent)
   at Infragistics.Olap.FilterViewModelBase.FillFromFilterMemberMembers(IFilterMember filterMemberToFill, Boolean drillDown)
   at Infragistics.Olap.FilterViewModelBase.FilterMemberPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at Infragistics.Olap.Data.Base.FilterMember.OnPropertyChanged(String propertyName)
   at Infragistics.Olap.Data.Base.FilterMember.set_IsExpanded(Boolean value)
   at TRIM.View.PivotTab.<>c__DisplayClass1b.<DrillIn>b__17() in C:\workspace\depot\spg\TRIM\View\PivotTab.xaml.cs:line 608

 

The same code worked without any issues with 11.1. Please advice what has changed and how I might be able to fix it.

 

Thanks,

Divya

 

Parents
  • 17559
    posted

    Hello Divya,

     

    I have been investigating the issue that you are referring and I believe that the error that you are getting may be connected to some changes that we have made into the XamPivotGrid API in the latest versions of the product. Could you please try to update your  expanding methods with the ones shown in the latest  version of our sample browser with the updated code snippets: choose the sample browser for version 11.2->XamPivotGrid->Scenarios->Expand hierarchies

     

    Since our sample browser internally use the first version of the product  in 11.2, I believe that if you apply the shown code this should fix the issue. In case this doesn’t help in your scenario, would you please send me a small sample, where the issue is reproducible, so I can continue investigating this.

     

    Thanks in advance.

Reply Children