I'm using Navigator with jqGrid and I'm repeating over and over settings such as:
savekey: [true, 13],
closeOnEscape: true,
closeAfterAdd: true
How can I define these settings globally to all my grids on current page?
I know how to specyfiy jqGrid settings globally, but I have problems with Navigator. My sample Navigator definition looks like this:
    $("#dictionaryElementsGrid").navGrid(
        "#dictionaryElementsPager",
        {
            search: false,
            edit: true,
            add: true,
            del: true
        },
        {
            // Edit options:
            savekey: [true, 13],
            closeOnEscape: true,
            closeAfterEdit: true
        },
        {
            // Create options:
            savekey: [true, 13],
            closeOnEscape: true,
            closeAfterAdd: true
        }
    );
				
                        
The object
jQuery.jgrid.editis responsible for the default setting of Add and Edit forms, so you can include in your common JavaScript code the following:The
recreateForm:trueoption is another option which I recommend you to use if you use some events in the Edit or Add form.Another settings
jQuery.jgrid.nav,jQuery.jgrid.del,jQuery.jgrid.viewand of coursejQuery.jgrid.defaultscan be also helpful and can be used in the same way asjQuery.jgrid.editabove. For example,The settings
edit:true,add:true,del:trueare already default (see the source code of navGrid)