Click here to Skip to main content
15,915,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've two forms (frmMain and frmSearch)

frmMain have DataGrid and button controls, the button showing frmSearch to search and return datatable, and frmMain is still open.

when frmSearch returns datatable with search result i want fill with this datatable so i write this code

C#
using (frmMain MainForm = new frmMain()
            {
                MainForm.ShowDialog();
                gvExams.DataSource = myDataTable;
            }


so the form instantiated a new form and DataGrid have nothing.

i want convert my DataGrid Control to a static Control (i can't). or Help Me...
Posted
Updated 24-Feb-12 5:24am
v2

1 solution

Have a look at this article("Passing Data Between Forms"[^]) in CodeProject. This will help you out.

Good luck,
OI
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900