After upgrading to the latest service release of 2011-2 I am now getting an exception when setting the DataSource to Nothing (in order to clear the grid). The exception raised is:
{System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Controls.Grids.XamPivotGrid.DataSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Infragistics.Controls.Grids.XamPivotGrid.set_DataSource(IOlapViewModel value) at Cowi.Kompas.KompasClient.vmTable.UpdateDataSource(ObservableCollection`1 ds)}
The exception is only raised if DataSource has previously been set.
Is this a bug or feature? The exception was not thrown prior to the SR upgrade. If it is a feature, is there other preferred method to clear the data source and grid contents?
Mikael
Hi
I will look at it, but at first look i can say that we fixed similar issue. Is there anything unusual in setting data source to null. Like threads or something like this,
Todor
Hi,
I created a small sample using a flatdatasource. When I tested with the initial release of 2011.2 it did create an issue when the xamPivotGrid dataSource was set to null. The grid continued to show the data and when you clicked on an existing cell a null exception was raised.
After I updated to the latest service release the issue was resolved. Please try applying the latest service release.
Or if I haven’t described your issue, please give me more details so that I can investigate further.