Datagridview rowvalidating vs cellvalidating
If I try to create a new record, it triggers the validation event, sees that the First Name field on the new record is empty, and throws up my message box.
The problem is being unable to cancel the moving from row to row (and, as such, attempting to save the changes).Thanks, Matt Jeffrey Tan[MSFT] wrote: Hi Matt, Thanks for your post.For Data Grid View, it has a Cell Validating and Row Validating events, these 2 event handlers take Data Grid View Cell Validating Event Args/Data Grid View Cell Cancel Event Args type paramters. We can set Cancel property to true to prohibit the user from selecting another row. Hope this helps Best regards, Jeffrey Tan Microsoft Online Partner Support Get Secure!Update: It appears it simply validates both when you are attempting to exit a row and when you are attempting to enter one.