foreach (DataGridViewColumn c in dg1.Columns) { dg.Columns.Add(c.Clone() as DataGridViewColumn); } foreach (DataGridViewRow r in dg1.SelectedRows) { int index = dg.Rows.Add(r.Clone() as DataGridViewRow); foreach (DataGridViewCell o in r.Cells) { dg.Rows[index].Cells[o.ColumnIndex].Value = o.Value; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)