Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/297.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# 如何从CellClick事件中获取行?_C#_.net_Visual Studio_Visual C# Express 2010 - Fatal编程技术网

C# 如何从CellClick事件中获取行?

C# 如何从CellClick事件中获取行?,c#,.net,visual-studio,visual-c#-express-2010,C#,.net,Visual Studio,Visual C# Express 2010,一旦用户单击DataGridViewRow中的一个单元格,我需要访问该行中的所有值。我想从DataGridView的CellClick事件中执行此操作 Datagridview1.Rows[e.RowIndex].cells[0].value 通过这种方式,您可以检查单元格索引并获取值

一旦用户单击DataGridViewRow中的一个单元格,我需要访问该行中的所有值。我想从DataGridView的CellClick事件中执行此操作

Datagridview1.Rows[e.RowIndex].cells[0].value
通过这种方式,您可以检查单元格索引并获取值