datagridview中的右键单击选项 [英] Rightclick option in datagridview
本文介绍了datagridview中的右键单击选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经为数据网格视图创建了快捷菜单条
它的工作.
但是问题在于,应该为每个单元格执行右键单击选项
例如.
更新操作
如果用户右键单击网格中的特定单元格,然后单击更新",则该单元格中的值应在更新操作中传递.
帮助我编码.....
请使用示例
i have created contextmenu strip for a datagrid view
its working.
But the problem is that rightclick option should be done for each cell
for eg..
a update operation
if the user right clicks on a particular cell in a grid then clicks update, the value in the cell should be passed in the update operation.
help me with coding.....
plz explain me with an example
推荐答案
使用 ^ ]将使您可以从鼠标单击坐标获取单元格的行和列索引.
Using HitTest[^] will let you obtain cell''s Row and Column index from mouse click coordinates.
这篇关于datagridview中的右键单击选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文