Further Details on Vallidating Event not Working....
- by Sameep
I have created a custom control that inherit the TextBox, in that control i have override validating event and in validating event i have put validation that checks for the empty field.
Now when i use that control on my winform and when i click on save button it immediate fires save event.. the validation event of custom control fires and it displays the error message but still it does not stop the save event to fire....
the save button CauseValidation Property is set to true..
i have also put (this.ValidateChildren())
i have also put CancelEventArgs ce.Cancel = true; in Custom Textbox control
but neither working to stop the save event to fires..
i only want to fire Save event if Textbox is not empty.
validating event fires, shows message for empty field and immediate fires save event..
now if you got an idea then if you have solution then please provide solution..