更新时间:2023-12-06 12:11:34
调用 ValidateChildren()
方法,使该表单的所有子控件验证其数据.
Calling ValidateChildren()
method of the form, cause all of the child controls of the form to validate their data.
You can also use the the other overload of the method which accepts a validation constraint, ValidateChildren(ValidationConstraints)
to limit the validation to immediate child controls, enabled controls, tab stop controls, selectable controls, visible controls or all control.
要查看使用 Validating
事件和 Error
提供程序控件进行验证的示例,并显示错误摘要,并阅读有关Windows Forms中验证选项的更多信息,请查看以下内容帖子:
To see an example of validation using Validating
event and Error
provider control and showing error summary and also read more about validation options in Windows Forms, take a look at these posts: