网格右键菜单 [英] Grid right click menu

查看:73
本文介绍了网格右键菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在显示DataGridView以显示图像和名称.
当DataGridView图像右键单击以显示菜单时,在该菜单中显示人员姓名.

//如何显示单元格单击图像的名称以显示在此处//
m.MenuItems.Add(new MenuItem("view"));
m.MenuItems.Add(new MenuItem("Exit"));

示例:像这样的右键菜单

卡尔提
查看
退出

如何显示.

问候,
Karthikeyan,班加罗尔.

Hi,
i am display DataGridView to display image and name.
when DataGridView image right click to show menu .in that menu to display name of person name.

// how to display cell click image name to show here //
m.MenuItems.Add(new MenuItem("view"));
m.MenuItems.Add(new MenuItem("Exit"));

example: like this right click menu

Karthi
view
Exit

how to show it.

Regards,
Karthikeyan,Bangalore.

推荐答案

您将需要
DataGridViewColumn.ContextMenuStrip属性

访问链接有示例,
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.contextmenustrip.aspx [ ^ ]

祝您编码愉快!
:)
you will need
DataGridViewColumn.ContextMenuStrip Property

visit link there is example,
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.contextmenustrip.aspx[^]

Happy Coding!
:)


这篇关于网格右键菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆