110,538
社区成员
发帖
与我相关
我的任务
分享
private int _RowIndex = 0;
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) //在dataGridView的CellClick()事件中,记录下当前所选取中的行号
{
_RowIndex = e.RowIndex;
}
dataGridView1.Rows[_RowIndex].Selected = true; //设置历史选中行的选中状态为true