Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Resources
Productivity and Design Tools
How to automatically focus the input after clicking for in-cell Grid Editing like jquery
Hello, Qiushen Jiang.
Here is a StackBlitz example demonstrating how to implement the targeted functionality.
To achieve the demonstrated behavior, we use the following, marked in yellow, code:
cellClick: function (e) { if (e.dataItem.inEdit && e.field === this.editField) { return; } this.exitEdit(e.dataItem, true); this.editField = e.field; e.dataItem.inEdit = e.field; this.$nextTick(() => { const input = document.querySelector( `input[value="${e.dataItem[e.field]}"]` ); input && input.focus(); }); }
Please let me know if you need furhter assistance with the implementation of your scenario.
Hello, Qiushen Jiang.
Here is a StackBlitz example demonstrating how to implement the targeted functionality.
To achieve the demonstrated behavior, we use the following, marked in yellow, code:
cellClick: function (e) { if (e.dataItem.inEdit && e.field === this.editField) { return; } this.exitEdit(e.dataItem, true); this.editField = e.field; e.dataItem.inEdit = e.field; this.$nextTick(() => { const input = document.querySelector( `input[value="${e.dataItem[e.field]}"]` ); input && input.focus(); }); }
Please let me know if you need furhter assistance with the implementation of your scenario.