Hi,
I've been encountering some issue with XamDataGrid on all versions after version 17.2.20172.2029.
Version 17.2.20172.20029 was the last working version, but unfortunately this version is missing some important features which has been developed afterwards.
Regarding the issue:
So far I have encountered i two scenarios:
1: When using empty XamDataGrid with AutoGenerated columns. Once the data source is changing a mysterious NullReferenceException is thrown:
Exception thrown: 'System.NullReferenceException' in InfragisticsWPF4.DataPresenter.v18.2.dllSystem.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=SelectedTreeNode; DataItem='CTMViewModel' (HashCode=66898905); target element is 'TreeView' (Name=''); target property is 'SelectedItem' (type 'Object') NullReferenceException:'System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Windows.DataPresenter.FieldLayout.IsListObjectCompatible(Object listObject, IEnumerable containingCollection, Boolean ignoreAutoGenerateFlag, PropertyDescriptorProvider pp, StringBuilder errorLog, Boolean assumeFieldMatch) at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionReset() at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object sender, Object eventArgs) at Infragistics.Windows.DataPresenter.RecordManager.OnChangeNotification(Object sender, Object eventArgs, Boolean isReset, Boolean isCellChangeNotification) at Infragistics.Windows.DataPresenter.RecordManager.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType) at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType) at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.ClearItems() at System.Collections.ObjectModel.Collection`1.Clear() at XamDataGridIssuePerhapsBug.ViewModels.CTM.CTMViewModel.set_SelectedTreeNode(Object value) in C:\Users\nn\Desktop\WorkSpaceVS\TestApplication\XamDataGridIssuePerhapsBug\ViewModels\CTM\CTMViewModel.cs:line 32'
Why is that a mysterious exception ? Well it is thrown at ChildrenCollection.Clear() and as you can see on the above picture the collection is not null. And this exception is thrown for every second time the data source is changing. And regardless of which item you select. This exception as mentioned before does not happen i version 17.2.20172.2029.
This exception only occurres if the DataSource of XamDataGrid is set, if the datasource is not set rest of UI works fine and there is no Exception
Once the exception has occurred the grid start behaving strange with drawing items on top of each other and some items cannot be clicked.
2: This exception happens as well when the grid is loaded with the saved settings like filtering and layout.
I have attached an project with some sample data.
How to reproduce this issue. Simple expand a couple of the treeview items and click for instance on the first level, then on second level and on third level. Afterward clicking on any item will throw the exception for each second click.
XamDataGridIssuePerhapsBug.rar
Hello Nawed,
Thank you for the update,I am glad that you find the latest SR 281 to apply the fixed patch.
Confirmed! This issue is resolved with the service release 281. perhaps even before as Divya mentioned that she couldn't reproduce it with release 187.
Finally found it:
Even with the update I don't get that version.
Ahh... I see... I have to run the updater instead of downloading... Will try with the new version and let you know