create a custom control inherit from gridview
override below two methods. and use this custom gridview instead of datagridview.
Protected Overrides Function ProcessDataGridViewKey(ByVal e As System.Windows.Forms.KeyEventArgs) As Boolean
Try
If e.KeyCode = System.Windows.Forms.Keys.Enter Then
If MyBase.CurrentCell.ColumnIndex = MyBase.Columns.Count - 1 And MyBase.CurrentCell.RowIndex = MyBase.Rows.Count - 1 Then
Dim a As Form
a = DirectCast((MyBase.FindForm()), Form)
a.Controls.Find(MyBase.AccessibleDescription, True)(0).Focus()
Else
MyBase.ProcessTabKey(e.KeyData)
End If
Return True
End If
Return MyBase.ProcessDataGridViewKey(e)
Catch
End Try
End Function
Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = System.Windows.Forms.Keys.Enter Then
If MyBase.CurrentCell.ColumnIndex = MyBase.Columns.Count - 1 And MyBase.CurrentCell.RowIndex = MyBase.Rows.Count - 1 Then
Dim a As Form
a = DirectCast((MyBase.FindForm()), Form)
a.Controls.Find(MyBase.AccessibleDescription, True)(0).Focus()
Else
MyBase.ProcessTabKey(keyData)
End If
Return True
End If
Return MyBase.ProcessDialogKey(keyData)
End Function
Happy Coding!
:)