- Home
- Forum
- JavaScript - EJ 2
- Grid scrolls at entering inline edit mode
Grid scrolls at entering inline edit mode
Hi support,
if the user clicks a cell to edit the content, the grid always scrolls to the first editable field.
This is unexpected and causes confusion to the user.
Over the years there have been several different suggestions to overcome this.
But I could not manage anyone to work.
My grid has frozen columns and dropdown edit fields and checkbox edit fields.
The newest I found was this here
https://www.syncfusion.com/forums/152385/set-focus-to-specific-cell-in-normal-edit-grid-mode
But his still does not work.
My code is this
Inside complete Action
It does also not work, when I call the focus without timeout.
I do get the correct field name at double click, but the focus is not set.
How can I do this?
Or is there a new switch to prevent the grid from scrolling? This would be the best solution.
Regards,
Stephan
Hi Stephan Schrade,
Greetings from Syncfusion support.
We understand that you would like to prevent the Grid from automatically scrolling to the first editable cell when entering inline edit mode and instead keep the focus on the cell that was double‑clicked. By default, the Syncfusion Grid sets focus on the first editable cell of the row when editing begins.
Index.js
let setFocus; var grid = new ej.grids.Grid({ .................................... actionComplete: function (e) { if (e.requestType === 'beginEdit') { // To select the current edited cell from the edit form e.form.querySelector('#' + this.element.id + setFocus.field).focus(); } }, recordDoubleClick: function (args) { // To capture the current edited cell setFocus = args.column; }, .................................... }); grid.appendTo('#Grid'); |
Video Demonstration: Please find in the attachment.
API References: actioncomplete, recorddoubleclick
If you need any other assistance or have additional questions, please feel free to reach out to us.
Regards,
Aishwarya R
Attachment: 197813Video_d5da2f9f.zip
Hi Aishwarya,
many thanks!
Works like a charm!
Regards,
Stephan
Hi Stephan Schrade,
You are most welcome. Please get back to us if you need any other assistance.
Regards,
Aishwarya R
- 3 Replies
- 2 Participants
- Marked answer
-
SS Stephan Schrade
- Nov 19, 2025 09:37 PM UTC
- Nov 21, 2025 06:15 AM UTC