troubleshooting Question

Close a form and pass data to the form that called it

Avatar of smickell
smickellFlag for United Kingdom of Great Britain and Northern Ireland asked on
3 Comments1 Solution232 ViewsLast Modified:
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(object sender, EventArgs e)
            formClockCardFiller formCCF = new formClockCardFiller(currentWeek);
            formCCF.WindowState = FormWindowState.Normal;

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?
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros