DataGridView and Control Box Closing
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I have a bound DataGridView on a form with the CausesValidation property set to true (as I want). The CausesValidation property of the form is false. When I click on the Control Box 'x' to close the form, the 'RowValidating' event of the DataGridView fires, and even if I execute a Cancel in that event, the FormClosing event still fires. Ideally I would like to either have the Control Box 'x' not cause the 'RowValidating' event of the DataGridView to fire, or have the Cancel in the 'RowValidating' event prevent 'FormClosing' from firing. Does anyone know if either of my preferred "solutions" is feasible when the DataGridView has its CausesValidation property set to true? Thank you...