如果是CellDoubleClick事件,可以在事件的参数e里获取列索引及行索引。
也可以通过CurrentCell来获取当前选中的单元格的列索引及行索引。

参考:
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
string name0=this.dataGridView1.Columns[e.ColumnIndex].Name;
//string name1=this.dataGridView1.Columns[this.dataGridView1.CurrentCell.ColumnIndex].Name;
}

DataGridView 鼠标双击获得行列索引的更多相关文章

  1. EasyUI使用之鼠标双击事件

    easyui鼠标双击事件,使用 onDblClickRow(index, row) 事件,在用户双击一行的时候触发,参数包括: index:点击的行的索引值,该索引值从0开始. row:对应于点击行的 ...

  2. Winform中设置ZedGraph鼠标双击获取距离最近曲线上的点的坐标值

    场景 WInforn中设置ZedGraph的焦点显示坐标格式化以及显示三个坐标数的解决办法: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/det ...

  3. java列表组件鼠标双击事件的实现

    Swing中提供两种列表组件,分别是列表框(JList)和组合框(JComboBox). 一.JList组件 构造方法: public JList():构造一个空的.具有只读模型的JList.publ ...

  4. WPF DataGrid 鼠标双击选中的DataGridRow及Row数据

    设置DataGrid的MouseDoubleClick事件 代码 //DataGrid鼠标双击事件 Private void dataGrid_MouseDoubleClick(object send ...

  5. 实现DevExpress GridControl 只有鼠标双击后才进行修改数据

    1. 实现DevExpress GridControl 只有鼠标双击后才进行修改数据:修改GridView.OptionsBehavior.EditorShowMode属性为Click 2. 实现De ...

  6. [Unity菜鸟] Unity鼠标双击,鼠标函数整理(未完)

    1. 鼠标双击 void OnGUI() { Event Mouse = Event.current; if (Mouse.isMouse && Mouse.type == Event ...

  7. 鼠标双击范围基于Win7

    TP鼠标双击范围主要是修改Registry中的HKEY_CURRENT_USER\Control Panel\Mouse里面的两个参数 DoubleClickHeight跟DoubleClickWid ...

  8. MFC鼠标单击截获鼠标双击事件,且无法记录单击的数据的解决方案

    遇到的问题: 鼠标点击会截断鼠标双击的事件,无法保存椭圆的数据.也就是说双击执行的过程是OnLButtonDown,OnLButtonUp,OnLButtonDblClk,OnLButtonUp.并不 ...

  9. 实现鼠标双击(OnGUI)

    void OnGUI()//实现鼠标双击 { Event Mouse = Event.current; if (Mouse.isMouse && Mouse.type == Event ...

随机推荐

  1. Linux基本命令(二)

    1. 输出重定向命令:> Linux允许将命令执行结果重定向到一个文件,本应显示在终端上的内容保存到指定文件中. 如:ls > test.txt ( test.txt 如果不存在,则创建, ...

  2. USB 3.0规范中译本 第2章 术语及缩略语

    本文为CoryXie原创译文,转载及有任何问题请联系cory.xie#gmail.com. 本章列出并定义本规范通篇将使用的术语及缩略语. 术语/略缩语 定义 ACK(确认包) 表示积极肯定的握手包. ...

  3. [tmux] Automate your workflow using tmux scripts

    Do you have a standard workflow that involves setting up a specific tmux layout, or running certain ...

  4. vue相关网站资源收集

    因为接了一个使用VUE + ES6 + Webpack的项目,所以在工作之余,也加紧了对这些知识的学习,这里放上遇到的觉得不错的网站链接: 1 vue官网 https://cn.vuejs.org 2 ...

  5. PatentTips - Integrated circuit well bias circuitry

    1. Field of the Invention This invention relates in general to an integrated circuit and more specif ...

  6. NetSnmp配置

    http://blog.csdn.net/shanzhizi/article/details/16985989

  7. PatentTips - OpenCL compilation

    BACKGROUND The present disclosure relates generally to integrated circuits, such as field programmab ...

  8. JavaScript调用ATL COM(二)

    作者:朱金灿 来源:http://blog.csdn.net/clever101 在上篇文章中介绍了如何在JS中调用ATL COM: JS调用ATL COM中的C++接口的做法 现在我们可以把它嵌入到 ...

  9. 关于使用Timer定时监测网络是否ping通

    项目需要连接某台具体服务端,如果连不上则实时提示,开始使用Timer实时检测 void timer_Tick(object sender, EventArgs e) { Ping pingSender ...

  10. 【codeforces 768A】Oath of the Night's Watch

    [题目链接]:http://codeforces.com/contest/768/problem/A [题意] 让你统计这样的数字x的个数; x要满足有严格比它小和严格比它大的数字; [题解] 排个序 ...