有2个DataGridview和第一个 Cellendedit 事件我怎样才能让这个事件在第二个 DataGridview 中添加行?
DataGridViewTextBoxCell textBoxCell = new DataGridViewTextBoxCell();
textBoxCell.Value = itemDetails.First().UnitNameArabic;
dataGridView1.Rows[i].Cells[4].Value = itemDetails.First().SalePrice;
dataGridView1.Rows[i].Cells[1].Value = itemDetails.First().NameArabic;
dataGridView1.Rows[i].Cells[0].Value = itemDetails.First().Number;
dataGridView1.Rows[i].Cells[2] = textBoxCell;
DataGridViewRow row = new DataGridViewRow();
row.Cells[0].Value = itemDetails.First().NameArabic;
dataGridView2.Rows.Add(row);
dataGridView2.Refresh();
不使用第二个 GridView
DataGridViewRow row2 = (DataGridViewRow)dataGridView2.Rows[i].Clone();
我是一名优秀的程序员,十分优秀!