-
C# 获取DataGridView鼠标单击单元格值
C# 单击 鼠标获取DataGridView单元格的值,这个例子需要连接SQL数据库,测试时候没连接成功,截图也不准确,请大家下载源码,自己配置环境调试吧,这是核心代码部分:
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{//获取DataGridView鼠标单击单元格值
var MyInfo = this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
MessageBox.Show("刚才的选择是:" + MyInfo, "信息提示", MessageBoxButtons.OK);
}
private void dataGridView1_MouseUp(object sender, MouseEventArgs e)
{//单击鼠标获取DataGridView单元格值
var MyHit = this.dataGridView1.HitTest(e.X, e.Y);
if (MyHit.RowIndex >= 0)
{
this.dataGridView1.Select();
var MyInfo = this.dataGridView1.Rows[MyHit.RowIndex].Cells[MyHit.ColumnIndex].Value.ToString();
MessageBox.Show("刚才的选择是:" + MyInfo, "信息提示", MessageBoxButtons.OK);
}
}
- 2022-07-18 18:54:50下载
- 积分:1
-
Test20190329_Http_By5_9_7
qt5 http模块简单测试,主要是get post的异步使用(Simple test of Qt5 HTTP module)
- 2020-06-18 05:00:01下载
- 积分:1
-
[数据结构(C语言版)].严蔚敏_吴伟民.扫描版
说明: 清华大学出版的关于数据结构的经典教材,详细介绍了关于数据结构的大部分知识点,可用于学习和编程参考(The classical textbook on data structure published by Tsinghua University introduces in detail most of the knowledge points about data structure, which can be used for reference in learning and programming.)
- 2020-06-19 21:20:02下载
- 积分:1
-
Telephone-management
信息输入输出查找删除插入更改显示保存建立(Telephone management system)
- 2016-03-14 07:01:34下载
- 积分:1
-
2048小游戏
说明: 实现小游戏2048的基本功能,以及各个方向的滑动,相加(Realize the Basic Functions of 2048 Small Game)
- 2020-06-20 19:00:02下载
- 积分:1
-
IPv4
在IPv4分组收发实验的基础上,增加了IPv4分组的转发功能,从而实现路由器中的IPv4协议,初步实现了路由查找算法。(IPv4 packet in the send and receive on the basis of experiments, an increase of IPv4 packet forwarding in order to achieve the IPv4 protocol router, the initial realization of the routing search algorithm.)
- 2011-06-05 11:29:32下载
- 积分:1
-
MATLAB
Grey prediction matlab program code灰色预测matlab程序(Grey prediction matlab program code)
- 2013-05-21 22:16:57下载
- 积分:1
-
DSP28335-bujindianji
DSP(TMS320F28335) + FPGA(XC3S500E) 控制步进电机例程源代码、原理图(DSP+ FPGA (TMS320F28335) (XC3S500E) control stepping motor example source code and schematic diagram)
- 2020-11-04 12:29:51下载
- 积分:1
-
the__rhe__file
说明: UNLZEXE converts the compressed file by lzexe to the UNcompressed
- 2018-12-26 15:36:10下载
- 积分:1
-
逻辑门作简单使用红外接收器和开关语句
该代码使用 switch 语句由接收方获取的红外信号和开关触发微处理器输入逻辑门 [和] [OR] [也] [NAND] 一次 x 和 y 连接进行醚 1 或 0 或 1 1 0 0 代码打开 LED 或关闭取决于门。
- 2022-08-05 09:50:03下载
- 积分:1