In jqgrid inline editing is stared by double clicking in a cell. Cursor is positioned to first editable column. Second click in required to place cursor to the cell which wa
Look at the demo from the answer. Either the demo do exactly what you need or you can modify the demo to your purposes.
UPDATED: 1) Do you tried my original demo or you tried to use the described idea in your code? In my environment (on different computers) the demo put the focus in the clicked cell. It works correct in IE9 (in native and even in the compatibility mode), IE8, Google Chrome 13, Safari 5.1, Opera 11.50, Firefox 3.6.20 and Nightly 9.0a1 (next version of Firefox).
2) The scrolling grid at the first editing position first and then to the clicked cell is the correct behavior. Per default jqGrid inline editing set the focus on the first editing cell and then, inside of oneditfunc
callback function of editRow, we change the focus to clicked cell.
My working solution:
onSelectRow: function(rowid,status,e){
if(rowid && rowid!==lastSel){
jQuery('#table_salary').restoreRow(lastSel);
lastSel=rowid;
}
jQuery('#table_salary').editRow(rowid, true);
$("input, select",e.target).focus();
},
Notice: