How to disable the default keyboard actions in JS Grid?
You can disable the default keyboard actions for particular keys in the JavaScript Grid. This can be achieved by removing the key configuration for the particular key from the grid’s keyBoardModule.
This is demonstrated in the below sample code where the key configuration for ‘delete’ key is removed in the dataBound event of the grid.
<script> var flag = true; // Grid’s dataBound event function function onDataBound(args) { if (flag) { // Removing key configuration for delete key this.keyboardModule.keyConfigs['delete'] = ''; flag = false; } } </script>
Once the default action for a key is disabled, you can manually bind required operations for the key action.
Output
Sample: https://stackblitz.com/edit/26f98e?file=index.js
Conclusion
I hope you enjoyed learning about how to disable the default keyboard actions in JS Grid.
You can refer to our JavaScript
Grid feature tour
page to know about its other groundbreaking feature representations and documentation, and
how to quickly get started for configuration specifications.
You can also explore our JavaScript
Grid example
to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!