Hi,
I would like to configure the wingrid in such a way that when a user presses right-arrow in the last column of a given row then the grid does not automatically move to the first column in the next row - it should stay in the same cell.
Could you please help?
Regards,
Adam
Thank you for your help, Mike and jct.
I implemented a solution using BeforePerformAction. I treat Tab and right-arrow keys the same way - good enough for me.
Best regards,
Hm. The KeyActionMapping that handles this is has an Action of NextCell and a KeyCode of Right. But there's no State in the grid for when the focus is in the last cell in the row. So there's no way to stop this action from working just in that one case.
Handling BeforePerformAction won't work either, because the event only gives you the action code, not the key. So you could prevent the NextCell action from occurring when the focus is in the last cell in the row. But there's no way to tell why the action occurred. There might be other keys (like tab) where you want the action to go through. Maybe this isn't a problem - Tab might use a different action like NextCellByTab. Or, you might have to trap the grid's KeyDown event and just record the last keystroke so you know which key was pressed right before the action.
Maybe my experience with reversing the tab order can help you:
http://forums.infragistics.com/forums/p/11783/44586.aspx