If you want to define some common settings for inline editing I would recommend you to use $.jgrid.inlineEdit. For example
$.extend($.jgrid.inlineEdit, { keys: true });
In the case you will have Enter key working in any form of usage of inline editing. In the case inline editing activated per formatter: "actions" will works in the same way like Add and Edit buttons added by inlineNav.
Alternatively you have to specify special for inlineNav the option for "add row" button in the following way
$("#myGrid").jqGrid("inlineNav", "#pager", {
editParams: { keys: true },
addParams: { addRowParams: { keys: true } }
});
Typically one defines all inline editing options in one object and uses the same options object twice:
var editingOptions = { keys: true };
$("#myGrid").jqGrid("inlineNav", "#pager", {
editParams: editingOptions,
addParams: { addRowParams: editingOptions }
});
See the answer for more code examples.
UPDATED: I think I found the reason why you had keys: false used during Add operation at the beginning, but had later keys: false working. The reason is the bug which I described in the bug report which I just posted. You can try to use fixed version of jquery.jqGrid.src.js (you can get it here). The reason was that
inlineNav has one bug: it uses always editParams inside of "Cancel" event handler (see the line) even if we cancel "Add" operation. So the method restoreRow was called with editParams as parameter.
- The next bug is that the line of
restoreRow changes $.jgrid.inlineEdit instead of just usage it. To fix the bug one have to change the line
o = $.extend(true, $.jgrid.inlineEdit, o );
to
o = $.extend(true, {}, $.jgrid.inlineEdit, o);