C#如何获取DataGridView对象的行列索引
1、我们需要在事件列表中找到DataGridView对象的CellClick事件。

3、此时我们便能利用DataGridCiewCellEventArgs事件变量e的RowIndex属性获得行索引,但是我们需要加1。

5、或者我们还能用过DataGridView对象的CurrentCell活动单元格属性组中的RowIndex属性获得加1。

1、我们需要在事件列表中找到DataGridView对象的CellClick事件。
3、此时我们便能利用DataGridCiewCellEventArgs事件变量e的RowIndex属性获得行索引,但是我们需要加1。
5、或者我们还能用过DataGridView对象的CurrentCell活动单元格属性组中的RowIndex属性获得加1。