I usually test my answers before giving them, but I am leaving my dev computer, so I'm not 100% sure which route is better, but here are some ideas you can try.
In the DataGridView, you can use the CellEndEdit event to indicate when the cell was edited. there is also a CellLeave event, but I have not used it, and you may need to experiment with it.
In a DataGrid, you can use the CurrentCellChanged event.
However, in order to do any calculations, you will need to extract your values ββfrom the underlying Dataable or DataView (depending on what the control is associated with). I also found that using the DataGrid.CurrentCellChanged event is an error, and it is thrown when the DataGrid is databaound, and not just when the user is editing the content, so you might have to deal with it ... I would suggest that the DataGridView CellLeave event may have similar problems. As I said, I'm not 100% sure, so you need to experiment.
In addition, as Kyle suggested, you can try to use events from the underlying DataSource.
DataTable.RowChanged or DataView.ListChanged events can be triggered.
As I said, I canβt test them myself, but I hope one of these ideas will point you in the right direction.
source share