I\'ve bound an ObservableCollection to a DataGrid. When I change values in the DataGrid, the RowEditEnding event is raised. But the e.Row.Item is the object before editing, so y
This solution seems simple enough. Referred from msdn forum.
private void dgEmployees_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e)
{
Action action = delegate
{
Employee emp = e.Row.Item as Employee;
//do something nice to the employee
};
Dispatcher.BeginInvoke(action, System.Windows.Threading.DispatcherPriority.Background);
}