hi there
i have 2 forms that each one has a datagridview.
i want when i fill dgv1 in form1 and press a button the dgv1 data has been sent to the dgv2 in form2.But it doesn't work.
form1:
public string str;
private void button1_Click(object sender, EventArgs e)
{
str = dataGridView1.CurrentRow.Cells[2].Value.ToString();
Form2 f2 = new Form2();
f2.Show();
}
form2:
private void Form2_Load(object sender, EventArgs e)
{
Form1 f1 = new Form1();
dataGridView1.Rows[0].Cells[2].Value = f1.str;
}