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
Divya,
I am also trying to do the same but using XMLA data source rather than a flat datasource. Do you have any examples of how to expand all rows and columns in a pivotgrid that is connected to a OLAP server through XMLA?
many thanks
Hello Divya,
I am just checking have you been able to resolve your issue? If you still need any assistance on the matter do not hesitate to ask.
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.