I have a WPF view (I use MVVM pattern) with a datagrid and some textBox, each textBox has the information of a cell of the dataGrid.
I would like to know, if a I edit a cell in the dataGrid, pass the new value to the textBox, to have in sync the textBox with the dataGrid.
I try the CellEditEnding event, but at this point, I have the old value.
How can I pass the new value to the textBox?
Thanks.
Daimroc.
The easiest way is to bind the TextBox to the Cell and have the bindings do the refreshing. For this, you will have to set the UpdateSourceTrigger of each Cell to PropertyChanged. See here