Hi Charles.SetFocustonextControl(true) is an UltraGrid method, so it will work fine inside an inherited UltraGrid. But then, you want to use Ctrl+Tab to exit the UltraGrid, which I agree is the easier thing for the user to understand, but I wasn't able to catch the keydown Ctrl+Tab from inside the UltraGrid.
In order to do that, I used my BaseForm and added the following code:
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, _
ByVal keyData As System.Windows.Forms.Keys) As Boolean
'-- check for unique keystrokes
Select Case keyData
Case Keys.Control Or Keys.Tab
'-- created to be able to tab out of a Grid control
Me.SelectNextControl(Me.ActiveControl, True, True, True, True)
End Select
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
This worked fine for me, since all forms will tab to next control once the user types Ctrl+Tab.
Regarding the Subs, they are overriding the grid's OnKeyDown (which we don't need anymore since we are testing the ProcessCmdKey in our base form) and OnEnter subs. That is why we call the MyBase.OnEnter(e) (remember DODEFAULT()? )
Thanks for the question, I wanted to write these features for myself as well.