How do I load a datagridview on a from from another form?
Posted on 2011-03-14
I have a form that contains a datagridview. The user can manually load the datagridview or they can click a button that will launch another form that will browse for a file, read the data from the file and post it to the datagridview on the original form. Within the button_click event on Form2 I have tried to add rows to the datagridview on Form1 to no avail. I have stepped through the code on Form2 and it is executing the DataGridView1.Rows.Add statement but nothing appears in the datagridview when Form2 closes. Any thoughts?