Our web application uses jqGrid for data entry, and data is edited inline and in rows.
A customer wishes a more “Excel-like” experience so that when switching a row to inline editing by clicking on a cell, that cell receives the focus (currently, the first cell in the row gets the focus).
Unfortunately the grid can only set focus to the first editable field in the row. You can see this in the source code of grid.inlinedit.js. Here it figures out the index of the row to set focus to, by iterating over them and finding the first one:
and later on it sets focus:
Which selects the element at the index stored in the
focusvariable – for reference, see the :eq selector docs.That said, if you are so inclined you could edit this section of code to add your own custom logic to control which element receives focus…