Winform右键单击单元格,弹出菜单

来源:互联网 发布:不基于比较的排序算法 编辑:程序博客网 时间:2024/05/16 11:21

Public …..CellMouseUp(………..){
If(e.Button==MouseButton.Right){ 
This.dataGridView1.Rows[e.Index].Selected=true;
//二列
This.dataGridView1.CurrentCell= This.dataGridView1.Rows[e.Index].Cells[1];
//谈出菜单
This.contentMnueStrip.Show(This.dataGridView1,e.Index);
/./弹出在鼠标位置
contentMnueStrip.show(Cursor.Position)


}


}

0 0
原创粉丝点击