//添加下面事件即可
private void DataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.RowIndex >= 0)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
this.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true;
}
}
}
相关文章:
-
2022-02-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2021-09-20
-
2021-05-28
猜你喜欢
-
2022-12-23
-
2022-02-10
-
2022-12-23
-
2021-06-29
-
2021-11-01
-
2022-12-23
相关资源
-
下载
2023-01-23
-
下载
2021-06-23
-
下载
2021-07-14
-
下载
2021-06-06
-
下载
2021-06-26