//In form 1 private void Review_Click(object sender, EventArgs e) { NewReview form2 = new NewReview (); form2.ShowDialog(); } public class NewReview : Form //add new form { } //Form 2 public partial class NewReview : Form { DataTable ReviewA; public NewReview (DataTable ReviewB) { InitializeComponent(); dataGrid1.DataSource = ReviewB; ReviewA= ReviewB; } }
//In Form1 Review_Click DataTable dt = new DataTable NewReview frmReview = new NewReview (dt ); // here you can pass your DataTable as argument frmReview.ShowDialog(); //In Form2 public NewReview (DataTable ReviewB) { InitializeComponent(); dataGrid1.DataSource = ReviewB; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)