Dear DevExpress Team,
I have a question regarding the new keyboard navigation for DxGrids in recent updates.
I'm working on this project for a while and implemented custom keyboard navigation in my grids for editing data and writing them back to a SQL database.
Unfortunately the newly introduced default keyboard navigation interferes with my own one.
I used the Escape key for canceling the edit mode and the tab key for jumping from one cell to another. So far so good.
But the new keyboard behaviour unfortunatly breakes my intended use for the Enter key. I implemented this as a key that saves the edited data to the database without the need of a seperate button.
Now the enter key just exits out of the edit component and my custom keyboard handler doesn't recognize the enter key anymore.
Is there a way to customize these keyboard events, so that a can use the enter key to fire my custom event again?
Thanks a lot in advance!
Greetings,
Christian Köhler
Hello Christian,
You are correct - the built-in keyboard support introduced in v24.1 can break your custom keyboard navigation logic as described in the following Breaking Change: Grid – Keyboard navigation is now enabled by default.
The Enter key is reserved for Keyboard Navigation (see Keyboard Shortcuts). Unfortunately, DxGrid does not have the built-in API to customize keyboard shortcuts. Therefore, we can only recommend the following solutions:
Let us know if you need further clarification.
Regards,
Keanu
Thank you for your quick response.
So, as far as i can understand, there is no way to add extra functionality to the Enter key event, like input validation and/or automatic saving to my database, or do i miss any possibilities?
Using any key other than Enter like would be very confusing to my user base, unfortunately.
If thats the case, it's a real bummer for my use case.
I hope such a functionality will be added in the future.
Regards,
Christian
Hi,
Sorry for going into this thread, but I am 100% on Christian's side here.
To prevent a user from letting the return key "do stuff" seems very strange to me.
Please consider changing this since it is simply against logic widely used in UI design.
Regards Torben