Grid
-
I have two forms Form1 and Form2. In form1 i have a grid control and a button. On button click form2 open. In form2 i have two textboxes & a button (Insert Value). I want when i click on form1 button form2 opens and i fill all values and then i click form2 button (Insert) all values insert in grid control and form2 close. Does any body know how to do this? MUHAMMAD WAQAS BUTT
-
I have two forms Form1 and Form2. In form1 i have a grid control and a button. On button click form2 open. In form2 i have two textboxes & a button (Insert Value). I want when i click on form1 button form2 opens and i fill all values and then i click form2 button (Insert) all values insert in grid control and form2 close. Does any body know how to do this? MUHAMMAD WAQAS BUTT
MUHAMMAD, From memory this is not really pleasant, But you need to create a new instance of Form1 to be able to programatically controll it and its values. Because the first instance of form1 has nothing to do with form2. If ne one has a better solution please let me know, because i dont like the work around. Thanks Chris
-
MUHAMMAD, From memory this is not really pleasant, But you need to create a new instance of Form1 to be able to programatically controll it and its values. Because the first instance of form1 has nothing to do with form2. If ne one has a better solution please let me know, because i dont like the work around. Thanks Chris
MUHAMMAD, Have u thought of using TAB pages? Chris
-
I have two forms Form1 and Form2. In form1 i have a grid control and a button. On button click form2 open. In form2 i have two textboxes & a button (Insert Value). I want when i click on form1 button form2 opens and i fill all values and then i click form2 button (Insert) all values insert in grid control and form2 close. Does any body know how to do this? MUHAMMAD WAQAS BUTT
You can use any solution of the follows: 1.make all textBoxes in form2 Public (not private), and then from from1 you can access all textBoxes in form2-the OK button now is just used to close the form. 2.You can create an array(public in form2) of length=the number of textBoxes u have in form2 and the OK button fills this array then closes the form, then from form1 you can access this array.