Hi Cyril,
Greetings from Syncfusion support.
When a new row is added or while editing an existing row, the escape key allows to cancel the add/edit action in the Grid. This is a default keyboard shortcut functionality implemented in the Grid for this case.
However you can disable this action by removing the ‘escape’ key from the Grid’s key configuration in its dataBound event(on initial render alone using a global flag variable) as demonstrated in the below code snippet,
|
// Grid’s dataBound event handler
dataBound() {
if (this.SO_lineItem_Grid_Loaded) {
this.SO_lineItem_Grid_Loaded = false;
var grid = this.$refs.SO_lineItem_Grid.$el.ej2_instances[0];
grid.keyConfigs.escape = "";
}
} |
We have modified the shared sample based on this for your reference. You can find it below,
Note: The escape key also has other shortcut actions implemented in the Grid like deselection of rows and cells, so removing this will also disable the other shortcut actions for this key.
Please get back to us if you require any further assistance.
Regards,
Sujith R