Why is my validating event not firing in C#?

前端 未结 1 1136
野的像风
野的像风 2021-02-12 14:20

I have a form that is dynamically created. It is a winForms application.

This form is just a menu and a series of textboxes and labels. For the sake of this example, you

相关标签:
1条回答
  • 2021-02-12 15:13

    I've had this before. In your form:

    private void SaveButtonClick(...)
    {
        if (this.ValidateChildren())
        {
            // do save
        }
    }
    

    ValidateChildren on MSDN

    0 讨论(0)
提交回复
热议问题