Use cellvalidating event datagridview
I understand that the impact in performance should be irrelevant when using simple validation and conditional highlighting rules but I would as much prefer it not to run useless code everytime the user moves to another cell if it can be avoided.
I display the data of the is datagridview in another interface and make the cells read-only. But the thing is when I click on a row that data was added previously and press the Add new row the cell validating event is triggered.
On the other hand, the Cell Value Changed event seems to trigger only when the value of the cell changes, which means the validation code runs only when the value changes and not everytime a user changes cells.
Now, since so many books use the Cell Validating event, I wonder if there is not any gotcha (in display for example) with using the Cell Value Changed?
Likewise, if you edit that formatted value and remove a zero, the function will fail to update the value, but if after doing that, you click on the cell and then leave it without making any changes, it will be formatted again and the missing zero will be added back. When you set the cell will remain in edit mode allowing your end users to enter the correct value.
The validating event handler can only update the cell value if that value was not actually changed during editing. In your actual setup indeed it is more appropriate to use the Cell End Edit event because you would want to change the actual cell`s value.