在VS2005的C# WinForm编程中,有一个DataGridView控件,要在其上按右键弹出右键菜单前选中当前行,可以在CellMouseDown事件中加入如下代码:
1
private void DataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
2
}
2