Hello Everybody,
I have two textboxes and one DataGridView in my Form
![]()
The Tab Index of textbox1 is 1
The Tab Index of textbox2 is 2
The Tab Index of DataGridView is 3
Now If I press Enter in Textbox1 I get focus on textbox2
It is working OK
Now If I press Enter in DataGridView then I want the Focus On textbox2
This is an example
Actually I am working on creating a custom textbox which binds the textbox to a dataGridView
So dont give the answers like
Textbox2.Focus()
Because the next control is not known
Thanks in Advance
I have two textboxes and one DataGridView in my Form

The Tab Index of textbox1 is 1
The Tab Index of textbox2 is 2
The Tab Index of DataGridView is 3
Now If I press Enter in Textbox1 I get focus on textbox2
It is working OK
Now If I press Enter in DataGridView then I want the Focus On textbox2
This is an example
Actually I am working on creating a custom textbox which binds the textbox to a dataGridView
So dont give the answers like
Textbox2.Focus()
Because the next control is not known
Thanks in Advance