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
60
KeyPress event in GridCell
posted

I need to implement an "undo" feature using the escape key.

Unfortunately, the requirements for this behavior conflict with the default behavior of UltraGrid. I need to undo the change on the first keypress, leaving the current cell in edit mode.

This should be straight-forward if there's a way to add an event handler to each cell in the grid. Unfortunately, the grid keypress event doesn't fire on the first keypress, as the cell is the active control.

 Anyone have any ideas how to go about this?

  • 469350
    Verified Answer
    Offline posted

    The default keyboard behavior in the grid is controlled by the KeyActionMappings. It's not exactly clear to me what you want to do here, so it's hard to know if you can acheive what you want using this collection. You may also be able to acheive what you want using the BeforePerformAction event of the grid.