日期:2014-05-19  浏览次数:20867 次

提问: 在DataGridView已经设置了右键菜单,但我还想把点右键时那个位置的CELL信息取出来。
右键CELL信息。

------解决方案--------------------
dataGridView1_CellMouseDown事件
if(e.Button==MouseButtons.Right)
{
//鼠标右键
string myStr = this.dataGridView1[e.ColumnIndex,e.RowIndex].Value.ToString();
MessageBox.Show(myStr);
}