0

I'm trying to create my own Next/back wizard control using multiple forms, In that I'm facing a problem in one scenario. I have my next/back button in parent form, default the next button will be enabled false after few validation in child form. I'm trying to enable parent Next button. I can't seem able to make it happen. I have tried the code shown below.

I'm trying this below code from my child form:

Default My parent form
Step1 my child form

Step1:

1.
Default d = new Default();
d.btnNext.Enabled = true;

2.
(this.Owner as Default).btnNext.Enabled = true;

3.
Default p = (Default)this.Owner;
Control[] c = p.Controls.Find("btnNext", true);
Button b = (Button)c[0];
b.Enabled = false;

enter image description here

  • i trying this below code from my child form Step1: Default d = new Default(); d.btnNext.Enabled = true; ------- (this.Owner as Default).btnNext.Enabled = true; ------- Default p = (Default)this.Owner; Control[] c = p.Controls.Find("btnNext", true); Button b = (Button)c[0]; b.Enabled = false; – Dinesh Kumar Aug 22 '16 at 07:32
  • can you edit your question and put the code in there ? It is to unreadable here in the comments and it is information that anyone that reads the question should know without having to read comments – GuidoG Aug 22 '16 at 07:39

0 Answers0