How to: Get and Set the Current Cell in the Windows Forms DataGridView Control
Interaction with the DataGridView often requires that you programmatically discover which cell is currently active. You may also need to change the current cell. You can perform these tasks with the CurrentCell property.
You cannot set the current cell in a row or column that has its Visible property set to false.
Depending on the DataGridView control's selection mode, changing the current cell can change the selection. For more information, see Selection Modes in the Windows Forms DataGridView Control.
To get the current cell programmatically
To set the current cell programmatically
This example requires: