DataGridView – Focus a specific cell

Spread the love

Question Description

How to set focus on any specified cell in DataGridView? I was expecting a simple way like Focus(rowindex,columnindex) but it is not that easy.

Practice As Follows

Set the Current Cell like:

DataGridView1.CurrentCell = DataGridView1.Rows[rowindex].Cells[columnindex]


DataGridView1.CurrentCell = DataGridView1.Item("ColumnName", 5)

and you can directly focus with Editing by:


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.