mga bro. unsa.on man nako pag display sa akong total nga akong gi input gikan sa subform ngadto sa main form.?
unsa man ang code? or unsa man akong buhaton?
mga bro. unsa.on man nako pag display sa akong total nga akong gi input gikan sa subform ngadto sa main form.?
unsa man ang code? or unsa man akong buhaton?
Sa Main.cs
Public string test;
Sa Form1/Subform.cs na event or function na mupass
Main myParent = this.Parent;
myParent.test = "hello";
or...
((Main)Parent).test = "hello";
actually he can
this is a drag and drop method
you have much more control rather than having them dynamic
form2:
public TextBox tx; 'reference of the control
private void button1_Click(object sender, EventArgs e)
{
tx.Text = textBox1.Text;
}
form1:
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.tx = textBox1;
frm.Show();
}
in this scenario the value you pass instantly shows on the textbox or which ever control you want to
if you only reference the parent form you cant call its controls
create a reference for the control you want to pass the value with
dont know if this is what he wants,
ingon ani xa bro..
naa koy combo box sa main form, kung mo select na gani ko ug item gikan sa combo box,
mo appear dayon ang sub form, so adto nako mag input sa mga info., unya, kung mo click nako
sa button nga display nga naa sa sub form adto xa ma display sa listbox nga naa sa main form.
sakto ba?
basta ingon ana xa..
sori mga bro.
bag.ohay pa lang jud ko nag learn aning
c#.net .. as in wla pa jud ko knowledge
anang mga butanga ..
Similar Threads |
|