V
Vaughn
In my MDI, I have a child form (frm_emp) that on a button click, displays
another child form w/ a listview (frm_list). I had two questions:
1) Assuming I already have the emplcode the user clicked on frm_list, how
would I be able to transfer that value back to frm_emp?
2) From within the double-clicked event in the frm_list, can I send the
emplcode value to frm_emp *and* execute a public method in frm_emp. It'd be
basically something like this (I know this code doesn't compile):
public String _myEmplcode = "";
private void btn_accept_Click(object sender, System.EventArgs e)
//clicked event in frm_list
{
frm_emp.empcode.Text = _myEmplcode; contains valid emplcode
frm_emp.RunThisMethod(); //RunThisMethod is public
this.Dispose(); //I'm done with the frm_list so I dispose.
}
I was also thinking if it's possible to validate the input in frm_emp.Text.
On the TextChanged property of the textbox, can I check to see where the
input came from and run a method according to the result? I'd be asking: if
the textbox input came from the value the listView returned, execute X
method. Otherwise (eg. the user entered a manual emplcode), do nothing.
Thank you.
another child form w/ a listview (frm_list). I had two questions:
1) Assuming I already have the emplcode the user clicked on frm_list, how
would I be able to transfer that value back to frm_emp?
2) From within the double-clicked event in the frm_list, can I send the
emplcode value to frm_emp *and* execute a public method in frm_emp. It'd be
basically something like this (I know this code doesn't compile):
public String _myEmplcode = "";
private void btn_accept_Click(object sender, System.EventArgs e)
//clicked event in frm_list
{
frm_emp.empcode.Text = _myEmplcode; contains valid emplcode
frm_emp.RunThisMethod(); //RunThisMethod is public
this.Dispose(); //I'm done with the frm_list so I dispose.
}
I was also thinking if it's possible to validate the input in frm_emp.Text.
On the TextChanged property of the textbox, can I check to see where the
input came from and run a method according to the result? I'd be asking: if
the textbox input came from the value the listView returned, execute X
method. Otherwise (eg. the user entered a manual emplcode), do nothing.
Thank you.