Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Can';t访问DataGridViewCellEventArgs_C#_Datagridview - Fatal编程技术网

C# Can';t访问DataGridViewCellEventArgs

C# Can';t访问DataGridViewCellEventArgs,c#,datagridview,C#,Datagridview,我想从DataGridView中提取单元格值 我为CellClick创建了一个事件,我得到: private void dataGridView1_Click(object sender, EventArgs e) { } 但是我需要一个DataGridViewCellEventArgs,而不是EventArgs来访问e.RowIndex 不知道我错过了什么。在每个教程中,我都看到事件自动注册为DataGridViewCellEventArgs。有什么提示吗?您可能想要的是CellCl

我想从DataGridView中提取单元格值

我为CellClick创建了一个事件,我得到:

private void dataGridView1_Click(object sender, EventArgs e)
{    
}
但是我需要一个
DataGridViewCellEventArgs
,而不是
EventArgs
来访问
e.RowIndex


不知道我错过了什么。在每个教程中,我都看到事件自动注册为
DataGridViewCellEventArgs
。有什么提示吗?

您可能想要的是
CellClick
事件,而不是
Click
事件:

检查了这个吗?