dataGridView上添加“右键菜单”
来源:互联网 发布:杭州人工智能招聘 编辑:程序博客网 时间:2024/04/29 11:18
dataGridView上添加“右键菜单”,需要添加工具"contextMenuStrip1", ,然后将form上的contextMenuStrip设定contextMenuStrip1,下面未用到的,将注释
执行右键的命令
private void cxToolStripMenuItem_Click(object sender, EventArgs e)//查询
{
toolStripButton1_Click(this, e);
}
//private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)//添加右鍵菜單
//{
// if (e.Button == MouseButtons.Right)
// {
// if (e.RowIndex >= 0)
// {
// if (dataGridView1.Rows[e.RowIndex].Selected == false)
// {
// dataGridView1.ClearSelection();
// dataGridView1.Rows[e.RowIndex].Selected = true;
// contextMenuStrip1.Show(MousePosition.X,MousePosition.Y);
// }
// }
// }
//}
- dataGridView上添加“右键菜单”
- 给DataGridView添加右键菜单
- 给DataGridView添加右键菜单
- winform datagridview添加右键菜单
- C# DataGridView添加右键菜单等技巧
- C# DataGridView添加右键菜单等技巧
- C# DataGridView添加右键菜单等技巧
- C# DataGridView添加右键菜单等技巧
- C# DataGridView添加右键菜单等技巧
- C# DataGridView添加右键菜单等技巧
- C# dataGridView右键菜单
- C#DataGridView右键菜单
- DataGridView右键弹出菜单
- datagridview右键菜单
- 给datagridview添加右键菜单并确定其位置
- C# DataGridView添加右键菜单等技巧 --转
- 【转】C# DataGridView添加右键菜单等技巧
- 如何在控件上添加右键菜单
- 锁定dataGridView左边的列,使锁定的列不随水平滚动条滚动
- 一道传说中爱因斯坦出的智力题 [续]
- KMPlayer切换声道花屏的解决办法
- windows默认共享的打开和关闭
- 对C和C++区别的一些零散总结
- dataGridView上添加“右键菜单”
- 关于由出国问题、未来问题等衍生出来的生气问题
- C和C++的区别介绍
- 解决telnet 登录错误“Failure in initializing the telnet session”
- C与C++的区别
- HeapAlloc,GlobalAlloc,LocalAlloc,VirtualAlloc
- ThinkPad 开机总提示找到新硬件 PCI Device
- Perl模块 (转)
- C++与C的区别