The adapters are the binding source for the DataRow in the DataGrid. We use a DataGridCollectionViewSource.
We tried storing DataGrid.SelectedIndex (one item will suffice, so only the index) ans DataGrid.CurrentColumn on Cell.EditEnded and then restored these values in DataGrid.ItemsSourceChangeCompleted. It did not work. The focus was on the whole DataGrid instead of a cell, so arrow keys did not work.
I think there are two key parts to this issue. First, we replace all the adapters by new ones. I tried using Clear+Add as well as Replace only on the bound collection (ObservableCollection) in the ViewModel.
Second, there is a probably somewhat unusual flow of actions going on, triggered by the user edit:
* The setter of the involved property is called
* The value is updated in the model (which is a complicated process)
* New Adapters are created from the model (which is also complicated)
* Those new adapters replace old ones, so there are a lot of NotifyCollectionChanged events.
* The setter of the involved property returns.
I think the problem is related to exchanging bound items while an EndEdit/property update is in progress.