日期:2014-05-17 浏览次数:20786 次
if (dgv1.Rows.Count > 1) { for (int i = 0; i < dgv1.Rows.Count-1 ; i++) { dgv2.Rows[i].Cells[0].Value = dgv1.Rows[i].Cells[0].Value; dgv2.Rows[i].Cells[1].Value = dgv1.Rows[i].Cells[1].Value; dgv2.Rows[i].Cells[2].Value = dgv1.Rows[i].Cells[2].Value; dgv2.Rows.Add(new string[] { dgv2.Rows[i].Cells[0].Value.ToString(), dgv2.Rows[i].Cells[1].Value.ToString(), dgv2.Rows[i].Cells[2].Value.ToString() }); } }