Emi*_*azu 1 .net c# datagridview
我有一个Windows窗体,其中包含2个datagridviews和它们之间的按钮来传输数据.在按钮成功传输数据后,我无法弄清楚如何将所选行的光标移动到下一行.
if (dataGridView1.CurrentRow != null)
dataGridView1.CurrentCell =
dataGridView1
.Rows[Math.Min(dataGridView1.CurrentRow.Index + 1, dataGridView1.Rows.Count - 1)]
.Cells[dataGridView1.CurrentCell.ColumnIndex];
Run Code Online (Sandbox Code Playgroud)