I\'ve been reading about this at least for 4 hours, and seems to be the list type, but I have a situation:
A ObservableCollection that has a collection property.
I tried this and the problem is that you have initialized your Level2 collection as Hashset<>
. IEditableCollectionView.EditItem()
throws this error while trying to update item in Hashset<>
.
I initialized the collection as List<>
and it was working fine.
I am not sure why it is not able to update item in hashset, need to look deeper into it. But changing the Hashset<>
to List<>
will fix this error.
Hope it helps
Thanks
In shorter way you can write:
DataGrid.BeginningEdit += (s, ss) => ss.Cancel = true;