处理CellMouseDown事件
if (e.Button == MouseButtons.Right)
{
if (e.RowIndex >= 0)
{
dataGridView2.ClearSelection();
dataGridView2.Rows[e.RowIndex].Selected = true;
dataGridView2.CurrentCell = dataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex];
this.下拉菜单 .Show(MousePosition.X, MousePosition.Y);
}
}