You can handle ProcessDataGridViewKey and check if editing control is there, then ignore the arrow keys, and let the editing control use the keys. But if the editing control is not there, the default behavior is good.
Public Class MyDataGridView
Inherits DataGridView
'Use this method to disable arrow keys navigation to next cell while typing
Protected Overrides Function ProcessDataGridViewKey(e As KeyEventArgs) As Boolean
Dim arrowKeys = New Keys() {Keys.Down, Keys.Up, Keys.Left, Keys.Right}
If arrowKeys.Contains(e.KeyCode) And EditingControl IsNot Nothing Then
Return False ' pass it To the editing control
End If
Return MyBase.ProcessDataGridViewKey(e)
End Function
'Use this method to disable Enter key navigation to next cell while typing
Protected Overrides Function ProcessDialogKey(keyData As Keys) As Boolean
If ((keyData And Keys.Enter) = Keys.Enter) And EditingControl IsNot Nothing Then
Return True 'Processed
End If
Return MyBase.ProcessDialogKey(keyData)
End Function
End Class
This method is a good point to control almost all the keys, but DataGridView has other methods to control the key behavior, including ProcessDialogKey or ProcessCmdKey that you can override to customize the functionality. You can also call (not override) the methods like ProcessRightKey, ProcessF2Key, and etc. to call the functionality.