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

如果单击是鼠标右键且不是表头则当前单元格为右键选择的单元格

posted @ 2013-05-08 10:07  JasonJiang  阅读(247)  评论(0编辑  收藏  举报