I am having problems with controls on a panel not firing. The controls that
are directly on the form will validate, but the controls on the panel will
I have the AutoValidate property for the form set to EnableAllowFocusChange
and then I call the ValidateChildren method when the save button is clicked.
If I cannot get the form to validate the controls, can I loop through each
control and call the validate event?
private void toolStripReviewActionItemsSaveItem_Click(object sender,
// Validate all of the children controls
// If any controls fail validation then show message box and return
// At least one of the controls failed validation
"Please correct the data and attempt the save again.",
this.Text + " - Invalid Data",
// Return from the form and correct the bad data
// Validation was successful so save the dataset to the database
// Disable the controls that are used to add or edit records