Very good point!
I personally prefer to use ondblClickRow event handler to start the editing mode. So you can use oneditfunc
parameter of the editRow:
ondblClickRow: function(rowid,iRow,iCol,e) {
grid.jqGrid('editRow',rowid,true,function(){
$("input, select",e.target).focus();
});
return;
}
or just place the like of code which set the focus after the call of editRow
:
ondblClickRow: function(rowid,iRow,iCol,e) {
grid.jqGrid('editRow',rowid,true);
$("input, select",e.target).focus();
return;
}
See the corresponding demo here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…