Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Change the navigation in WinGrid 2010.1
posted

On KeyDown event in the grid I check e.KeyValue.   If it's Keys.Tab, I want to change do the same logic as if the user had pressed the enter key.  

I do

dgDataEntry.PerformAction(BelowCell, False, False)

 dgDataEntry.PerformAction(EnterEditMode, False, False)
 dgDataEntry.ActiveCell.SelectAll()

After the code goes to the cell below, the cursor then jumps to the cell to the right.  It seems that the TAB still runs after my code.  How can I supress the tab?

Hope I explained this right.

  

  • 469350
    Offline posted

    Hi,

    You have to set e.Handled = true; to tell the grid that you handled the keystroke and therefore the grid should not.