I read through KB Article: KB02028 which shows a Sub to make the Enter key act like the Tab key when hit while in the UltraGrid. However it does not explain how to call it or when to call. Does anyone have any advice as how to implement it?
Thanks
Gary
Hi,
Sure, you can make Enter do whatever you want. Here's a KB article that will get you started:
HOWTO:UltraWinGrid Cursor Movement like Excel
You just have to switch NextCellByTab with PrevCellByTab and vice versa.
Hello Mike,
Is it possible to Map the enter Key to move left instead of moving right for RTL support?
Thanks,
ellswrth said:Any idea where I might look to track down the source of this issue?
I assume you are using code in the KeyDown or KeyPress event of the grid to acheive this. Can you post the code you are using?
Have you tried putting a breakpoint in that code to see if it's doing what it should be doing?
Are you handling other events of the grid, such as BeforePerformAction?
Have you modified the grid's KeyActionMappings?
ellswrth said:Is it potentially related to having configured shortcuts on menu items that map to Ctrl-Tab?
It's possible, but I'm not sure. It seems like you are saying that this only happens in some cells and not others. If it happens in cells that use masking (like DateTime cells) and does not happen in cells with plain text, then that would be an indication that something else may be interfering with the keystrokes because when you edit a plain text cell in the grid, the grid display a child control (A textBox) over the cell and it does not do this with masked cells. So this could be an issue with which control currently has focus.
This should be very easy to test, though. Simply change your shortcuts so they don't use Tab or Shift+Tab (or Enter) and see if that fixes it.
Sorry to resurrect an old one but I'm getting weird results.
I applied this to an existing grid - cell(0) and cell(1) are a date datatype/date time editor. When I add a row, I seed those two cells with a datetime value and put the user in cell(1) in edit mode with the text selected (so they just start typing to replace it).
When they press the enter key to leave the cell, instead of moving to cell(2) as the tab key would do, the Enter key moves DOWN a cell, adding a new row but leaving fields empty in the previous row.
Any idea where I might look to track down the source of this issue?
Is it potentially related to having configured shortcuts on menu items that map to Ctrl-Tab?
Thank for the pointer. I will keep that in mind when working on this form.