smickell
asked on
Close a form and pass data to the form that called it
I have a clock card form that can optionally open a quick-fill form that allows the user to specify a number of criteria, hit 'Fill' and it closes the subform to return to the original. There be an array passed (of some description) from the quick-fill form to the clock card form, this array will be analysed and a number of records created in a DataGridView.
On the original form I have this which launches the quick-fill:
private void btnFillEntries_Click(objec t sender, EventArgs e)
{
formClockCardFiller formCCF = new formClockCardFiller(curren tWeek);
formCCF.WindowState = FormWindowState.Normal;
formCCF.ShowDialog(this.Md iParent);
}
How do I fill the DataGridView once the form receives focus from the quick-fill form? This would be easier if I was creating a new form via a constructor, but in my case the calling form is already open. In the subform at OnLoad, do I create a reference to the calling form in some way?
On the original form I have this which launches the quick-fill:
private void btnFillEntries_Click(objec
{
formClockCardFiller formCCF = new formClockCardFiller(curren
formCCF.WindowState = FormWindowState.Normal;
formCCF.ShowDialog(this.Md
}
How do I fill the DataGridView once the form receives focus from the quick-fill form? This would be easier if I was creating a new form via a constructor, but in my case the calling form is already open. In the subform at OnLoad, do I create a reference to the calling form in some way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem, glad I was able to help. ;=)
ASKER