For example, for a Your response was great and saved me lots of time.
Is there a way to change the dgv cell Style Format and cell Tag from within the Cell Validating event?
I found a suitable code for it from the msdn library.
Unfortunately the code only allows integers to be entered in the datagridview.
I've tried a few things and have searched for answers without luck so far.
In general, it is better to use the Cell Parsing event whenever you need to convert/change the value in a cell.
You do this by using the Formatted Value property of the Data Grid View Cell Validating Event Args parameter.For example, this event triggers everytimes the users switches to another row.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?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.