A very good point!
I personally prefer to use the ondblClickRow event handler to trigger edit mode. So you can use the oneditfunc editRow parameter:
ondblClickRow: function(rowid,iRow,iCol,e) { grid.jqGrid('editRow',rowid,true,function(){ $("input, select",e.target).focus(); }); return; }
or just put the code that sets focus after calling editRow :
ondblClickRow: function(rowid,iRow,iCol,e) { grid.jqGrid('editRow',rowid,true); $("input, select",e.target).focus(); return; }
See the corresponding demo here .
source share