I have a datgridview and I want to do editing of the values of cell on that datagridview. But when I edit a cell value the old value goes away. So is there a way to track or fetch the old value of that edited cell?
thanks
Take a look at the CellValidating event:
void dgv_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
var oldValue = dgv[e.ColumnIndex, e.RowIndex].Value;
var newValue = e.FormattedValue;
}
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