In the end I did this programatically as it was simpler than going through all the forms...// The flag private bool _is Closing = false; // Action that avoids validation protected override void On Closing(Cancel Event Args e) // Validated event handler private void txt Control To Validate_Validated(object sender, Event Args e) // Do validation on complete so you'll remain on same thread void worker_Run Worker Completed(object sender, Run Worker Completed Event Args e) // Give a delay, I'm not sure this is necessary cause I tried to remove the Thread. When you display data entry functionality to users, you frequently have to validate the data entered into your form.The Data Grid View class provides a convenient way to perform validation before data is committed to the data store.To get notified, you can use the following events exposed by the Rad Grid View control: It is important to know that each one of the validation events is fired only when the user is trying to commit new data in the Rad Grid View control.They do not occur when the Rad Grid View loads data.I've even tried to set for the cancel button and all the parents of the cancel button. It seemed that if the user was in the middle of editing a field that was using validation and just decided to give up (leaving the field with an invalid input), the cancel button event was being fired but the window would not close down.
When I click on the Cancel button I just want to close the form.
They occur when the new content entered by the user is about to be committed.
Currently the validation occurs on row and cell level.
Cell Validating gives you the power to stop the commit process on a cell level obeying some internal rules of your application. To String()) If new Value And here is how the error message is displayed: The Cell Validated event occurs when the cell has validated the new content.
For example, a cell might contain only values between 0 and 12, and all other values are considered invalid. Unique Name = "Country Id" Then Dim new Value As Integer = Int32. It is raised after the Cell Validating event (when the Is Valid is not set to False), described in the previous section.