datagridview 单元格屏蔽右键。不想让右键的菜单显示。
解决方案 »
- winform 修改配置文件后重新读取。
- C# TabPage中添加了Form,Form中的DataGridView有问题??
- datagridview导入excel
- 正则匹配,但是中间有空格 回车等,怎么办?
- 菜鸟求助,高手请进-在VS2005中做的Windows程序怎么样生成可执行文件,急~~~
- 如何理解这句((Button)sender).Text = "mybutton"
- C#如何实现文件夹共享??高分求救!急等!!
- 第一次做winform组件,朋友们帮忙呀?
- C#现成~~~~~~~~····
- 使用AForge获取视频,在传输时遇到问题
- 关于CS模式客户端自动更新问题
- 问一个程序监控的问题??
{
//设置
}
难道就因为我用的是盗版?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace WindowsApplication237
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent(); DataGridView DGV = new DataGridView();
DGV.Parent = this;
DGV.Columns.Add("c1", "c1");
DGV.Rows.Add(new Object[] { 1 });
DGV.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(DGV_EditingControlShowing);
} void DGV_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
e.Control.ContextMenu = new ContextMenu();
}
}
}