Reputation: 187
I have a form with 2 controls is textbox and datagrid.
Firstly I focus on textbox, and I want only pressing Tab Key 1 times to select first row. But now when I press Tab Key at the first time it will focus first cell but row is not seleted, when I press Tab Key at the second time first row is seleted, see the picture.
How can I press TAB key at the first time then the first row is seleted. NOT the cell selected?
Upvotes: 1
Views: 303
Reputation: 155
You can try to set SelectionMode to FullRowSelect
in Form.Designer.cs :
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
or in properties of datagridview
Upvotes: 1