Hello,
I have posted same question on Silverlight forum and had no answers. Hope the reason was just wrong forum I've selected to post to...
Here is the original post :
I have a problem with xamPivotGrid exceptions occurring in the following scenario:
1. Pivot grid is loaded with previously saved layout view.
2. Data Source could be updated from underlying sources (webservices) at any given moment
3. If I then try to add new dimension to the grid from data selector eventually I see
System.InvalidOperationException exception thrown from InfragisticsWPF4.Olap.FlatData.v11.1 :
System.InvalidOperationException was unhandled
Message=Operation is not valid due to the current state of the object.
Source=InfragisticsWPF4.Olap.FlatData.v11.1
StackTrace:
at Infragistics.Olap.FlatData.FlatDataModelProvider.UpdateLevelMembers(IEnumerable`1 items, IHierarchy hierarchy, HierarchyDescriptor hierarchyDescriptor, Int32 levelIndex, DimensionMetadata dimensionMetadata, String uniqueNamePart)
at Infragistics.Olap.FlatData.FlatDataModelProvider.OnRemoveItemsFromItemsSource(ItemsSourceChangedEventArgs eventArgs, IList`1& deletedDataObjects, IList`1& modifiedHierarchies)
at Infragistics.Olap.FlatData.FlatDataModelProvider.OnUpdateHierarchiesData(ItemsSourceChangedEventArgs args)
at Infragistics.Olap.FlatData.FlatDataModelProvider.<>c__DisplayClass11.<ItemsSourceChanged>b__f()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
In my previous discussion of the problem with Plamen Pilev I understand that exception occurs while Data Source is not fully refreshed yet and (I am citing now from one of Plamen's e-mail) :
"OnRemoveItemsFromItemsSource collects an information about the hierarchies affected by this collection change.
UpdateLevelMembers method goes through the levels of affected hierarchies and remove the members that are no longer present because all data items which this member represents are removed.
This exception is signal that there is no such member in the level – because it’s not created yet I think. That might happen when the processing of the new added to rows/columns hierarchy is not finished yet, so its hierarchy structure (levels and members) is not ready and in the same time we try to remove an element of that structure."
I was advised by Plamen to continue discussion of this problem in the forum as it seems more appropriate from Dev. Support point of view.
Thanks a lot in advance for the help.
Alex Nebogatov
Hello Alex,
I apologize for the late reply. I tested your sample and see what is your issue, but could you built you solution again and set the assemblies specific version to false, so we could test it with our latest builds.
Looking forward for your reply.
Hi Stefan,
Here is the link for updated solution. http://www.sendspace.com/file/mh19lm
I did not see though Specific version set to true in my solution.
Also, the problem I am trying to resolve is now a subject of open ticket
(Infragistics case CAS-85408-WW5S31 [I])
Thanks a lot,
Alex
I've just downloaded and ran my solution from the sendspace link I've specified in previous post and I see same result.
There is no special steps actually to repro InvalidOperationException in FlatDataSource - You just start up application and wait few second when on timer tick operation of loading data source with test data from xml file will takes place. Also please make sure that you break on any CLR Exceptions
By then you should see the following in output window in your VS 2010 :
Step into: Stepping over non-user code 'FlatDataSourceException.App.App'
Step into: Stepping over non-user code 'FlatDataSourceException.App.InitializeComponent'
System.Windows.Data Error: 40 : BindingExpression path error: 'x:PivotVm' property not found on 'object' ''PivotControlViewModel' (HashCode=16946857)'. BindingExpression:Path=x:PivotVm; DataItem='PivotControlViewModel' (HashCode=16946857); target element is 'PivotControl' (Name='_pivotControl'); target property is 'DataContext' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'Databases' property not found on 'object' ''FlatDataSource' (HashCode=43171494)'. BindingExpression:Path=DataSource.Databases; DataItem='XamPivotDataSelector' (Name='dataSelector'); target element is 'Dropdown' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')
System.Windows.Data Error: 40 : BindingExpression path error: 'Database' property not found on 'object' ''FlatDataSource' (HashCode=43171494)'. BindingExpression:Path=DataSource.Database; DataItem='XamPivotDataSelector' (Name='dataSelector'); target element is 'Dropdown' (Name=''); target property is 'SelectedItem' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'NewGridLocation' property not found on 'object' ''PivotControlViewModel' (HashCode=16946857)'. BindingExpression:Path=NewGridLocation; DataItem='PivotControlViewModel' (HashCode=16946857); target element is 'ComboBox' (Name='_locations'); target property is 'ItemsSource' (type 'IEnumerable')
MainWindow - updateGUI() _stsPositions.SuspendCollectionChangeNotification() executed
MainWindow - updateGUI() _stsPositions Count - 0
MainWindow - updateGUI() vm.RefreshPositions() starting
MainWindow - updateGUI() vm.RefreshPositions() done
_stsPositions Count - 0
LoadTestData() finished . _stsPositions Count: 0
RefreshPositions() _positions.SuspendCollectionChangeNotification() is executed
RefreshPositions() _positions Count - 0
1.Added pos #0 to _positions. Count - 1
1.Added pos #1 to _positions. Count - 2
1.Added pos #2 to _positions. Count - 3
1.Added pos #3 to _positions. Count - 4
RefreshPositions() _positions.ResumeCollectionChangeNotification() is executed
RefreshPositions() _positions Count - 4
STSPositionViewModel RefreshPositions(String book) positions.SuspendCollectionChangeNotification(); is executed
RefreshPositions(String book) _positions Count - 4
RefreshPositions(String book) _positions.Clear(); is to be executed_positions Count - 4
RefreshPositions(String book) _positions.Clear(); was executed_positions Count - 0
RefreshPositions(String book) pos #0 to be yet added to _positions. Count - 0
RefreshPositions(String book) Added pos #1 to _positions. Count - 1
RefreshPositions(String book) pos #2 to be yet added to _positions. Count - 1
RefreshPositions(String book) Added pos #3 to _positions. Count - 2
RefreshPositions(String book) pos #4 to be yet added to _positions. Count - 2
RefreshPositions(String book) Added pos #5 to _positions. Count - 3
RefreshPositions(String book) pos #6 to be yet added to _positions. Count - 3
RefreshPositions(String book) Added pos #7 to _positions. Count - 4
STSPositionViewModel RefreshPositions(String book) positions.ResumeCollectionChangeNotification(); is executed
***********************************************************
Plsease don't mention pos# bug. I've just incremented pos index wrongfully in Debug.WiteLine statement on line 174 in STSPositionsViewModel.cs
Thanks a lot in advance,
I have been looking into your new sample, but there weren’t any exceptions on my side. As for the BindingExpression errors, I can say that it is normal, because by the time the XamPivotGrid loaded the Data is still loading, but they don’t actually break your UI. I also contacted our Dev. team and they were able to reproduce your behavior with the latest internal build of 11.2 and they will try to fix it in the Service release planned for April, but if you want they can make an untested built for you earlier.
Thanks for the info. I am glad your devs are able to see the problem that prevents us from using xamPivotGrid in our app. Please, let us test even untested build as early as it is out. I think it could be beneficial for both sides.
Thanks again,
I have logged this with development under ID: 104671 and I have also created a support ticket on your behalf: CAS-81599-BC43H8 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
Actually I wanted to ask you about planned service release you've mentioned before - is it early or late April it's planned for ?
Thansk a lot,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account \My Keys and Downloads.
I apologize for the delay. The Untested build is now ready and will provide your colleague with it through the private case.
Even thought the case was transferred to my colleague I wonder if the test buld is out ?
I am rolling off the project soon and I'd like to get some issues fixed.
The case has been transfered to your colleague.
I have added the info required for case transfer to the case page.