3
Reply

how to move the data from one gridview to another gridview

rashmi kc

rashmi kc

Jul 20 2012 1:24 AM
5.8k
when i press the button1 all the data in the gridview should move to another gridview in windows form application
here s my code pls correct it....

here i am getting only blank grid in    dataGridView2 




  private void button4_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewColumn c in dataGridView1.Columns)
            {
                dataGridView2.Columns.Add(c.Clone() as DataGridViewColumn);
            }
        }

Answers (3)