Hi,
I do not have a sample ready, but when i enable conditional formatting via code behind and add new new rows to the underlying collection, the grid throws exception "Key already exists"
Below is the stack trace for your reference. I am using 12.2.20122.2204, the same issue occurs with previous releases as well.
at Infragistics.Collections.WeakDictionary`2.AddHelper(TKey key, TValue value, Boolean replace) at Infragistics.Controls.Grids.RowsManager.AttachDetachPropertyChanged(INotifyPropertyChanged propertyChangedDataObject, Boolean attach) at Infragistics.Controls.Grids.RowsManager.DataManager_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at Infragistics.DataManagerBase.OnDataSourceCollectionChanged(NotifyCollectionChangedEventArgs e) at Infragistics.DataManager`1.OnDataSourceCollectionChanged(NotifyCollectionChangedEventArgs e) at Infragistics.DataManagerBase.
b__3(DataManagerBase instance, Object s, NotifyCollectionChangedEventArgs e) at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex) at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at
e catchHandler)
<Add Data Here>
Hello Rohit,
I have been looking through your post and created a sample project (XamGridConditionalFormatting.zip). After the gri is loaded AllowConditionalFormatting property is set to true. And a rule is applied to the first column. The user can add new items to the source collection by pressing AddRecord button. It seems that no exception is thrown on my side. Would you please have a look at the attached project and let me know if I am missing something in your scenario? Could you modify the project so that it reproduces the issue or attached your sample project? Thank you in advance.
By the way, this is when using XamGrid