日期:2014-05-17 浏览次数:21032 次
//获得DateGridView单元格的值,这个Cells[参数]值是你要修改的索引,
string name= DateGridView2.CurrentRow.Cells[0].Value.ToString();
dataGridView1.Rows[0].Cells["column1"].Value =name;
for (int 填 = 0, 列数 = DataGridView.ColumnCount; 填 != 列数; 填++)
DataGridView1.Rows[DataGridView1.CurrentCellAddress.Y].Cells[填].Value = DataGridView.Rows[DataGridView.CurrentCellAddress.Y].Cells[填].Value;