rashmi kc

rashmi kc

  • NA
  • 113
  • 159.2k

how to move the data from one gridview to another gridview

Jul 20 2012 1:24 AM
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)