Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
modify sub-controls visibility while form is hidden
posted

I'm not sure where to put this and this isn't exactly an infragistics question but how can I programmatically show/hide child controls on a dialog form?

I do this validation that show/hides controls. the problem is that I have to do this while the form is showing because when it's not showing and i set the Control.Visible property it just stays false, it ignores me.

right now I'm doing this for my solution:

         _view.Show();

         bool done = ValidateControls();

         _view.Visible = false;

         if (done)

            return DialogResult.OK;

         else return _view.ShowDialog();

But I don't like this solution because when we're "done" it flashes an empty box before moving on due to me calling _view.show and then _view.visible = false;

could i validate during some kind of showing event and cancel the show event on "done"?

Parents
No Data
Reply
  • 4618
    posted

    Hi Lanierhall,

    I dont see any reason why you would not be able to validate during one of the show events and then cancel the show event. I am going to investigate this issue further and I will let you know of my findings.

    If you have any questions, please let me know.

    Sincerely,

    Chris K

    Developer Support Engineer

    Infragistics, Inc.

    www.infragistics.com/support

     

Children
No Data