Hi Carlos,
We could see you would like to focus the next field in the edit form after pressing the enter or tab key. Currently, on tab key press, the next input field will be focused and on enter key press, the edit state will be closed which is the behavior. However, if you wish to focus the next input on enter key press you can achieve it by overriding the default key configs value that is bound in the Grid.
Initially, in the actionComplete event for beginEdit requestType, the default keyConfigs value for enter key is removed and keyUp event is bound to the form element. In the keyUp event for enter key press, the next element is focused.
function actionComplete(args) {
if (args.requestType == "beginEdit") {
this.keyConfigs.enter = "";
args.form.addEventListener('keyup', function (event) {
if (event.keyCode == 13) {
var nextSibling = event.target.closest('.e-rowcell').nextSibling;
if (nextSibling) nextSibling.querySelector('.e-field').focus();
}
});
}
} |
Now since the default keyConfigs for enter key is removed all the operations for the key will be removed. To avoid it you can restore this when the edit state is closed.
else if (args.requestType == "save" || args.requestType == "cancel") {
this.keyConfigs.enter = "enter";
} |
We have prepared a sample for your reference. You can find it below,
Regards,
Seeni Sakthi Kumar S