Issue – This issue is regarding the focus not being set to the same field when moving to the Next/Previous record in JQGrid using Up/Down arrow keys respectively. For e.g.: If the user sets the focus in Part Number field and moves to the next or previous record using arrow keys, the focus is not being retained in the Part Number field instead the focus moves to the first column for the row.
Technical Challenge – Tracking of the previously selected row’s focused column and setting the focus to the same column in the newly moved row is not feasible as by default in JQGrid, the focus will be set to the first column of the row by default at first. This is a default JQGrid behavior.
Tried Solution:
We used the Cell Focus Out event to capture the last focused column and when the user moves to a new record, we tried setting it to the same column of the newly selected row. Since a row can be selected in more than a way such as arrow keys or mouse clicking on a row’s any column. Due to this, if a user clicks on any other column using a mouse, still the focus was being set to the previously selected column of the previous row which is wrong. Basically, this is because, we will not be able to identify how the user has selected a row in On Select Row event of JQGrid.
Please provide the solution for this focus issue.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top