As I advised your way of thinking is not inline with the grid design.
You have the ability to use the override procedures defined on the grid, whether its for validation, computation, performing the data saving, or performing additional after the grid data is saved. At any point an exception is raised in any of the procedures the data will be rolled back by the plugin.
All procedures will all have a paramater passed in which will have the full grid row data for each row that's being changed. You will LOOP through this data and compare to your underlying table and perform what ever action you want. You need to understand this concept as you will be able to achieve your result using this concept.
If you cannot achieve this then you will need your company to purchase consulting time from us where we will document a working example for this requirement.