DataGridView中右键选择单元格
If e.Button = MouseButtons.Right AndAlso e.RowIndex > -1 AndAlso e.ColumnIndex > -1 Then DGV_Longitudinal.CurrentRow.Selected = False DGV_Longitudinal.CurrentCell = DGV_Longitudinal(e.ColumnIndex, e.RowIndex) End If
如果单击是鼠标右键且不是表头则当前单元格为右键选择的单元格