Question DataGridView validating question

ALX

Well-known member
Joined
Nov 16, 2005
Messages
253
Location
Columbia, SC
Programming Experience
10+
In a DataGridView, when the user opts to add a new row (by clicking a "Add Row" button), I want to force the "Validating" event to occur before actually adding the row. It appears to me that the "Validating" event occurs only when the user changes the "Current Cell". It also appears that the "DataGridView.InvalidateCell(...)" method only causes a repaint of the cell. Are there any other methods that cause the validating event to occur that I could use?
 
Why would you want to validate a brand new row? It doesnt contain any data other than the defaults you set (which hopefully are right)!
 
I want to validate the CURRENT cell BEFORE adding the new row. If the current cell does not pass validation, the new row will not be added.
 
Last edited:
Back
Top