datagridview有一列DataGridViewCheckBox,但连续点击的话(1秒点击N次),会导致出错,数据处理不正确,感觉

private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e) {}的没处理完,一般处理方法就是再加个doubleclick事件

private void dgv_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) {
     dgv_CellContentClick(sender, e);
     dgv_CellContentClick(sender, e);
}
上面一般能解决问题,但是我在实际过程中还是有点问题,所以我会用下面的方法
private void dgv_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) {
     dgv_CellContentClick(sender, e); //只执行一次
}
 private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
try
{
dgv.Enable = false;
........
}
catch (Exception ex)
{
}
finally
{
dgv.Enable = true;
}
}

  

DataGridView的DataGridViewCheckBox问题的更多相关文章

  1. DataGridView key points

    Simple Examples => http://csharp.net-informations.com/datagridview/csharp-datagridview-readonly-c ...

  2. [WinForm] DataGridView 绑定 DT && ComboBox 列绑定 Dict

    一  需求介绍 一般像枚举类型的数据,我们在数据库里存储着诸如(1.2.3.4-)或者("001"."002"."003"-)此类,但是界面 ...

  3. [Winform] DataGridView 总结(FAQ)

    Q1.  如何使单元格不可编辑? A:设置 ReadOnly 属性,可以设置的对象包括 DataGridViewRow(行).DataGridViewColumn(列).DataGridViewCel ...

  4. [Winform] DataGridView 中 DataGridViewComboBox 的可编辑

    在 DataGridView 中设置的 DataGridViewComboBox,默认是不可编辑的,即使将其列属性 DisplayStyle 设置成 ComboBox 或其他,也无法编辑: 故作如下处 ...

  5. c#datagridview

    //保证显示当前活动单元格 this.Invoke(new Action(() => { dataGridView1.CurrentCell = dataGridView1.Rows[index ...

  6. DataGridView 在下拉框添加下来事件

    DataGridView中有一种下拉框式的列,给这个列添加下拉事件时需要转化一下才可以绑定下拉事件 /// <summary> /// 服务类型 /// </summary> ...

  7. 设置DataGridView的某个单元格为ComboBox

    怎么将DataGridView的 某个单元格设为ComboBox的样式而不是整列都改变样式? 1.最简单的方法:利用DataGridView提供的DataGridViewComboBoxCell. 写 ...

  8. 用DataGridView导入TXT文件,并导出为XLS文件

    使用 DataGridView 控件,可以显示和编辑来自多种不同类型的数据源的表格数据.也可以导出.txt,.xls等格式的文件.今天我们就先介绍一下用DataGridView把导入txt文件,导出x ...

  9. 图解DataGridView编辑列

    WinForm中DataGridView功能强大,除了可以自动绑定数据源外,还可以根据需求编辑列.下面以截图说明添加编辑列的步骤(HoverTreeSCJ 项目实际界面). 1.选择DataGridV ...

随机推荐

  1. 将 node.js 的数据保存到 mongo 数据库中

    Mongo 数据库 安装 首先到 Mongo 的官方网站下载安装程序:http://www.mongodb.org/,我下载的文件名为:mongodb-win32-x86_64-2008plus-2. ...

  2. HDU 1856

    http://acm.split.hdu.edu.cn/showproblem.php?pid=1856 对于这道题,主要就是让你求出有最多结点的树的树叶: 我们只要利用并查集的知识吧所输入的数据连接 ...

  3. HDU1325

    http://acm.split.hdu.edu.cn/showproblem.php?pid=1325 #include<stdio.h> #include<algorithm&g ...

  4. 【转载】Myeclipse如何自动创建hibernate

    Myeclipse如何自动创建hibernate:http://jingyan.baidu.com/article/456c463b99f4370a583144a8.html An internal ...

  5. Virtualenv介绍

    [翻译]http://virtualenv.readthedocs.org/en/latest/index.html virtualenv是创建独立python环境的一种工具. 环境搭建的过程中,有一 ...

  6. [翻译]你真的知道你看到的UTF-8字符是什么吗?

    翻译自http://www.pixelstech.net/article/1397877200-You-know-what-UTF-8-is-when-you-see-it- Source : son ...

  7. mongodb 文件,图片存储数据库

    mongodb  文件,图片存储数据库

  8. C++学了这么多年,你仍不知道的事

    C++学了这么多年你知道为什么定义类时,类的定义放在.h文件中,而类的实现放在cpp文件中.它们为什么能够关联到一起呢?你知道什么东西可以放在.h文件中,什么不能.什么东西又可以放在cpp文件中.如果 ...

  9. MFC常见问题解惑

    MFC类的分类 1 Root: CObject : CObject2 Application Architecture Classes: CWinApp/CFrameWnd/... 3 Window, ...

  10. 解决Github访问超慢问题[自己留档]

    解决Github访问超慢问题 Github is so slowly. 这段时间访问 github 都非常慢,google了一下发现是github某个CDN被伟大的墙屏蔽所致. 出问题的应该是这个CD ...