Answer the question
In order to leave comments, you need to log in
How to synchronize Datagrid and ObservableCollection?
Voros on WPF C#.
We have Datagrid and ObservableCollection. When editing cells in the datagrid, the celleditending event fires before the ObservableCollection is updated. Those. the cell already displays the new value, while the collection still displays the old one.
If you subscribe to the ObservableCollection change event, then it occurs at the start of editing the next cell. Those. edited a cell and until we start editing another - the event will not happen.
How can I make sure that when editing the datagrid, the ObservableCollection is updated immediately?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question