I want to validate what the user has entered immediately after the user has finished entering a row in a datagrid.
What event should I be looking at, and how do I retrieve the row data? Or even better, the object it's bound to?
Use the RowEditEnding event.
private void DataGrid_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e)
{
YourObject obj = e.Row.Item as YourObject;
if (obj != null)
{
//see obj properties
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With