Use one dataGridView to fill two seperate dataGridViews ? HOW?
<p>I have two dataGridViews  and two textBoxes when I write in any textbox a form is opened to choose items after I double click the row of the opened dataGridView the item is filled in one of the DataGridViews.</p>

<p>How can I make If I wrote in textbox belongs to the dataGridView #1 the items is filled in the dataGridView # 1 if two then filled in the dataGridView # 2 </p>

<pre><code>     private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
    {
        int currentRow = int.Parse(e.RowIndex.ToString());

        Form3 f3 = null;
        TextBox t = null;
        if ((f3 = (Form3)IsFormAlreadyOpen(typeof(Form3))) == null)
        {
            f3 = new Form3();
            DataGridView dt = (DataGridView)f3.Controls["dataGridView2"];

            string aa = dataGridView1[1, currentRow].Value.ToString();


            dt.Rows.Add(aa, "0");


            f3.Show();
            f3.Controls["T_Material"].Text = "";
            this.Close();
        }
        else
        {
            f3.Select();
            DataGridView dt = (DataGridView)f3.Controls["dataGridView2"];

            string aa = dataGridView1[1, currentRow].Value.ToString();


            dt.Rows.Add(aa, "0");
            f3.Controls["T_Material"].Text = "";
            this.Close();

        }
    }



   private void textBox7_TextChanged(object sender, EventArgs e)
    {
        Form1 f1 = null;
        if ((f1 = (Form1)IsFormAlreadyOpen(typeof(Form1))) == null)
        {
            f1 = new Form1();
            f1.Show();

        }
        else
        {
            f1.Select();
        }

    }
</code></pre>
