I have a UserControl, which is basically a wrapper for a GridView that needs to send a message every time a cell content (of the GridView) is changed. Usually, that could be solved like this:
private void MainDataGrid_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
{
var editingTextBox = e.EditingElement as TextBox;
doSomething(editingTextBox.Text);
}
The problem is that I don't know the type of EditingElement (which comes as a FrameworkElement) so I cannot do the conversion. And in that moment, the currentCell.SelectedValue is still the original value. I also don't have control over the model (where I could implement INotifyPropertyChanged and use it to catch the changes).
Is there some simple way I am missing? Or how would you go about implementing this? Thank you for any suggestions.