0

I am using free jqGrid 4.12.1. I want to add, edit and delete rows in the grid and wish to make server side calls for each operation. I have added editurl and 'actions' formatter as below,

 {
  name: "actions",
  width: 100,
  formatter: "actions",
  formatoptions: {
      keys: true,
      editOptions: {},
      addOptions: {},
      delOptions: {}
  }       
  }

I am adding 'inlineNav' as below,

$("#itemList").jqGrid('inlineNav',"#itemListPager", 
         {
            edit: true,
            add: true,
            del: true,
            search: true,
            searchtext: "Search",
            addtext: "Add",
            edittext: "Edit",
            deltext: "Delete"
        },
        {  
            closeOnEscape: true, //Closes the popup on pressing escape key
            reloadAfterSubmit: true,
            drag: true,
            url: "${pageContext.request.contextPath}/billing/saveItem",
            errorfunc: function (rowId, resp) {
                alert(resp);
            },
            afterSubmit: function (response, postdata) {
                if (response.responseText == "") {

                    $(this).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid'); //Reloads the grid after edit
                    return [true, '']
                }
                else {
                    $(this).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid'); //Reloads the grid after edit
                    return [false, response.responseText]//Captures and displays the response text on th Edit window
                }
            },
            editData: {
                EmpId: function () {
                    var sel_id = $('#itemList').jqGrid('getGridParam', 'selrow');
                    var value = $('#itemList').jqGrid('getCell', sel_id, '_id');
                    return value;
                }
            }
        },
        {
            closeAfterAdd: true, //Closes the add window after add
            url: "${pageContext.request.contextPath}/billing/saveItem",
            afterSubmit: function (response, postdata) {
                if (response.responseText == "") {

                    $(this).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid')//Reloads the grid after Add
                    return [true, '']
                }
                else {
                    $(this).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid')//Reloads the grid after Add
                    return [false, response.responseText]
                }
            }
        },
        {   //DELETE
            closeOnEscape: true,
            closeAfterDelete: true,
            reloadAfterSubmit: true,              
            url: "${pageContext.request.contextPath}/billing/saveItem",
            drag: true,
            afterSubmit: function (response, postdata) {
                if (response.responseText == "") {

                    $("#itemList").trigger("reloadGrid", [{ current: true}]);
                    return [false, response.responseText]
                }
                else {
                    $(this).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid');
                    return [true, response.responseText]
                }
            },
            delData: {
                EmpId: function () {
                    var sel_id = $('#itemList').jqGrid('getGridParam', 'selrow');
                    var value = $('#itemList').jqGrid('getCell', sel_id, '_id');
                    return value;
                }
            }
        },
        {//SEARCH
            closeOnEscape: true
        }       
        );

The 'inlineNav' added above has no effect because no server side call is made on adding a new row or deleting existing row. The server side call is made only in case of edit, and that call too does not happen through 'inlineNav' code above. Because even if i remove 'inlineNav' code the server side call is still made to the 'editurl'. So how can i make server side calls on adding/editing/deleting rows and also pass parameters to these calls. I will really appreciate if someone can point me to a working example somewhere. Thanks

UPDATE:-

I have removed 'actions' formatter and modified code to look as below,

<script type="text/javascript">

var dataGrid = $('#itemList');
var firstClick = true;
    $(document).ready(function () {
        $('#action').click(function () {
            if (!firstClick) {
                $("#itemList").setGridParam({datatype:'json'}).trigger("reloadGrid");
            }   
            firstClick = false;
        $("#itemList").jqGrid({
            url: "${pageContext.request.contextPath}/billing/medicines",
            datatype: "json",
            //styleUI : 'Bootstrap',
            mtype: "POST",
            autowidth: true,
            shrinkToFit: true,
            sortname: "Id",
            sortorder: "asc",
            loadBeforeSend: function(jqXHR) {
                 jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val());
            },
            postData: {
            },
            loadError: function (jqXHR, textStatus, errorThrown) {
                alert('HTTP status code: ' + jqXHR.status + '\n' +
                      'textStatus: ' + textStatus + '\n' +
                      'errorThrown: ' + errorThrown);
                alert('HTTP message body (jqXHR.responseText): ' + '\n' + jqXHR.responseText); 
            },
            colNames: ["Id", "Item Type", "Item Code", "Unit", "Stock", "Batch No.", "Expiry Date", "Quantity Per Unit", "Price"],
            colModel: [
                { name: "itemId", width: 35, align: "left", sorttype:"int", search: false},
                { name: "itemType", width: 100, align: "left",  editable: true},
                { name: "itemCode", width: 120, align: "left",  editable: true},
                { name: "unit", width: 70, align: "left", search: false,  editable: true},
                { name: "availableQuantity", width: 55, align: "left", search: false, formatter: "number",  editable: true},
                { name: "batchNumber", width: 80, align: "left", search: false,  editable: true},
                { name: "expiryDate", width: 80, align: "left", search: false, sorttype: "date",  editable: true, formatoptions: {srcformat:'d/m/Y', newformat:'d/m/Y'}},
                { name: "quantityPerUnit", width: 80, align: "left", search: false, formatter: "number",  editable: true},
                { name: "price", width: 55, align: "left", search: false, formatter: "number",  editable: true}
            ],
            pager: "#itemListPager",
            rowNum: 50,
            rowList: [50, 100, 150, 200],
            rownumbers: true,
            rownumWidth: 25,
            sortname: "id",
            sortorder: "desc",
            viewrecords: true,
            height: '100%',
            loadonce: true,
            //gridview: true,
            autoencode: true,
            editurl: "${pageContext.request.contextPath}/billing/saveItem",
            caption: "Item List",
            ondblClickRow: function(rowId){}
        }).navGrid('#itemListPager',{add:false,edit:false,del:true});
        $("#itemList").jqGrid('filterToolbar', {autoSearch: true, stringResult: true, searchOnEnter: false, defaultSearch: 'cn'});
        $("#itemList").jqGrid('gridResize', { minWidth: 450, minHeight: 150 });

        var saveparameters = {
                "successfunc" : null,
                "url" : "${pageContext.request.contextPath}/billing/saveItem",
                    "extraparam" : {},
                "aftersavefunc" : null,
                "errorfunc": null,
                "afterrestorefunc" : null,
                "restoreAfterError" : true,
                "mtype" : "POST"
            };

        var editparameters = {
                "keys" : false,
                "oneditfunc" : null,
                "successfunc" : null,
                "url" : "${pageContext.request.contextPath}/billing/editItem",
                    "extraparam" : {},
                "aftersavefunc" : null,
                "errorfunc": null,
                "afterrestorefunc" : null,
                "restoreAfterError" : true,
                "mtype" : "POST"
            };

        var parameters = { 
                   edit: true,
                   editicon: "ui-icon-pencil",
                   add: true,
                   addicon:"ui-icon-plus",
                   save: true,
                   saveicon:"ui-icon-disk",
                   cancel: true,
                   cancelicon:"ui-icon-cancel",
                   addParams : saveparameters,
                   editParams : editparameters
                };
        $("#itemList").jqGrid('inlineNav',"#itemListPager", parameters);

    });
});
</script> 

The sample json dada is as,

[
{"itemDetailId":1,"itemId":1,"itemType":"Medicine","itemCode":"Aler-Dryl","itemDesc":"Aler-Dryl","batchNumber":"batch1","expiryDate":"18/02/2017","unit":"tablet","subUnit":"tablet","availableQuantity":120.0,"quantityPerUnit":60.0,"price":122.0},
{"itemDetailId":2,"itemId":2,"itemType":"Medicine","itemCode":"Benadryl","itemDesc":"Benadryl","batchNumber":"batch1","expiryDate":"18/02/2017","unit":"ml","subUnit":"ml","availableQuantity":60.0,"quantityPerUnit":120.0,"price":90.0}
]

Now the url specified in editparameters and saveparameters is getting invoked on editing and adding a row respectively. Please suggest if above approach is a good one. Also how can we set a request header before edit or save data is posted to server. And i can not find anything like deleteparameters similar to editparameters and saveparameters so that i can use delete specific parameters.

UPDATE 2:-

I could successfully set a request header before server side code is invoked on add/edit row using following code,

 $.ajaxSetup({
            beforeSend: function (jqXHR, settings) {                     
               jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val());
          }});

UPDATE 3:-
Cleaned up code as per Oleg's suggestions as below. But in the strict mode i am getting JS error now - "Uncaught ReferenceError: saveparameters is not defined"

<script type="text/javascript">
$(document).ready(function () {
    "use strict";
    var dataGrid = $('#itemList');
    var firstClick = true;
    $('#action').click(function () {
        if (!firstClick) {
            $("#itemList").setGridParam({datatype:'json'}).trigger("reloadGrid");
        }   
        firstClick = false;
    $("#itemList").jqGrid({
        url: "${pageContext.request.contextPath}/billing/medicines",
        datatype: "json",
        mtype: "POST",
        autowidth: true,
        loadBeforeSend: function(jqXHR) {
             jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val());
        },
        colNames: ["Id", "Item Type", "Item Code", "Unit", "Stock", "Batch No.", "Expiry Date", "Quantity Per Unit", "Price"],
        colModel: [
            { name: "itemId", width: 35, align: "left", sorttype:"int", search: false, editable: false, key: true},
            { name: "itemType", width: 100, align: "left"},
            { name: "itemCode", width: 120, align: "left"},
            { name: "unit", width: 70, align: "left", search: false},
            { name: "availableQuantity", width: 55, align: "left", search: false, formatter: "number",},
            { name: "batchNumber", width: 80, align: "left", search: false},
            { name: "expiryDate", width: 80, align: "left", search: false, sorttype: "date", formatoptions: {srcformat:'d/m/Y', newformat:'d/m/Y'}},
            { name: "quantityPerUnit", width: 80, align: "left", search: false, formatter: "number"},
            { name: "price", width: 55, align: "left", search: false, formatter: "number"}
        ],
        cmTemplate: {editable: true},
        pager: true,
        rowNum: 50,
        rowList: [50, 100, 150, 200],
        rownumbers: true,
        rownumWidth: 25,
        sortname: "itemType",
        sortorder: "asc",
        forceClientSorting: true,
        viewrecords: true,
        height: '100%',
        loadonce: true,
        //gridview: true,
        autoencode: true,
        editurl: "${pageContext.request.contextPath}/billing/saveItem",
        caption: "Item List"
        //ajaxRowOptions: { beforeSend: myTokenSetting }, loadBeforeSend: myTokenSetting where var myTokenSetting = function(jqXHR) { jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val()); }
    }).navGrid({add:false,edit:false,del:true});
    $("#itemList").jqGrid('filterToolbar', {autoSearch: true, stringResult: true, searchOnEnter: false, defaultSearch: 'cn'});
    $("#itemList").jqGrid('gridResize', { minWidth: 450, minHeight: 150 });

    var saveparameters = {
            "successfunc" : null,
            "url" : "${pageContext.request.contextPath}/billing/saveItem",
             "extraparam" : {},
            "aftersavefunc" : null,
            "errorfunc": null,
            "afterrestorefunc" : null,
            "restoreAfterError" : true,
            "mtype" : "POST"
        };

    var editparameters = {
            "keys" : false,
            "oneditfunc" : null,
            "successfunc" : null,
            "url" : "${pageContext.request.contextPath}/billing/editItem",
             "extraparam" : {},
            "aftersavefunc" : null,
            "errorfunc": null,
            "afterrestorefunc" : null,
            "restoreAfterError" : true,
            "mtype" : "POST"
        };

    var parameters = { 
               edit: true,
               editicon: "ui-icon-pencil",
               add: true,
               addicon:"ui-icon-plus",
               save: true,
               saveicon:"ui-icon-disk",
               cancel: true,
               cancelicon:"ui-icon-cancel",
               addParams : saveparameters,
               editParams : editparameters
            };
    $("#itemList").jqGrid('inlineNav',parameters);

    $.ajaxSetup({
        beforeSend: function (jqXHR, settings) {
           alert('Before Row Send');         
           jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val());
      }});

    });
});
</script>
ivish
  • 572
  • 11
  • 35

1 Answers1

3

You should examine the options of inlineNav to find out that you use absolutely wrong options:

jQuery("#grid_id").jqGrid('inlineNav', pagerid, parameters);

where parameters have the form

{ 
    edit: true,
    editicon: "ui-icon-pencil",
    add: true,
    addicon: "ui-icon-plus",
    save: true,
    saveicon: "ui-icon-disk",
    cancel: true,
    cancelicon: "ui-icon-cancel",
    addParams: {useFormatter : false},
    editParams: {}
}

You use the options of another method navGrid

jQuery("#grid_id").jqGrid('navGrid', '#gridpager', {parameters},
    prmEdit, prmAdd, prmDel, prmSearch, prmView);

which allows to use form editing.

You wrote that you want to use both formater: "actions" andinlineNav. Thus you would have to provide some options of inline editing twice. I would recommend you to read [the wiki article](https://github.com/free-jqgrid/jqGrid/wiki/New-style-of-usage-options-of-internal-methods). It describes the problems with the usage of form editing usingformatter: "actions"andnavGridtogether. The usage of inline editing have very close problems. You will have to provideaddParamsandeditParamsproperties ofinlineNavand the corresponding options offormatter: "actions"` (see here). To make the code more readable and simple free jqGrid provides another form of editing options.

You can specify all inline editing options inside of inlineEditing option of jqGrid, additional specific options of inlineNav method (if required) in navOptions or in inlineNavOptions, the options of Delete operation in formDeleting and so on. Moreover reloadGrid have the option fromServer: true to restore the original value of datatype ("json", "jsonp", "xml", ...) which you used. You can use reloadGridOptions: { fromServer: true } option of form editing or formDeleting to force reloading from the server.

Moreover your existing code contains many very suspected parts with _id and EmpId. I would strictly recommend you to include the example of format of input JSON data which you use to fill the grid. If you want to use EmpId as the name of rowid why you use _id instead? The code fragment like

EmpId: function () {
    var sel_id = $('#itemList').jqGrid('getGridParam', 'selrow');
    var value = $('#itemList').jqGrid('getCell', sel_id, '_id');
    return value;
}

shows that the current rowid seems be wrong and _id column contains correct information which you need as rowid under the name EmpId.

You can for example use prmNames: { id: "EmpId"} and to add key: true to the column _id. The property key: true in the column _id will inform jqGrid to use the value from the column _id as the rowid and prmNames: { id: "EmpId"} will rename default id property used in Edit and Delete to EmpId. Thus jqGrid will automatically send EmpId parameter with the value from _id column during Delete and Edit operations to the server.

Probably you can remove unneeded column _id from the grid too (at least if you hold the column hidden), but I need to see input data of jqGrid to say you exact options of jqGrid which you can use.

I'm sure that you can essentially reduce your existing code and make it more readable using free jqGrid options, but you have to review your existing code carefully. I suggest you to start with the usage of correct rowid and elimination of all hidden columns which you use. Free jqGrid provides additionalProperties feature which structure is very close to the structure of colModel, but the corresponding properties of input data will be saved in the local data only and not placed in DOM of the table. I can explain all more clear if you would post your existing colModel, jsonReader and example of JSON response returned from the server (1-2 rows of data with dummy data would be enough).

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thanks for the detailed reply. I will review my sample code as per your suggestions and let you know. By the way, i am just trying to get the row add/edit to work by using the code in the article here - http://www.codeproject.com/Articles/610359/JqGrid-Inline-Editing. Once it works i will use the same approach in my application. – ivish Feb 20 '16 at 10:43
  • @ivish: The example from codeproject.com is far from be good. Look at [the answer](http://stackoverflow.com/a/34721322/315935) and **post example of JSON data returned from your server**. Do you need to use RESTful editing or to use HTTP POST in all editing request? – Oleg Feb 20 '16 at 11:27
  • @ivish: If you use ASP.NET then [the demo project](http://www.ok-soft-gmbh.com/ForStackOverflow/ProductStore1.zip) which I created for [the answer](http://stackoverflow.com/a/35359395/315935) could be interesting for your too. – Oleg Feb 20 '16 at 11:43
  • Hello Oleg, i have added an 'UPDATE' to my question. As of now i need only HTTP POST in all edit requests. I am using spring/java on server side. nevertheless thanks a lot for sharing ASP.NET demo project. I am going through javascript part of the project to see how editing is implemented. – ivish Feb 20 '16 at 12:02
  • @ivish: First of all some common things. You should **never define global variables**. You should move `var dataGrid = $('#itemList'); var firstClick = true;`. The current code assign `dataGrid` and `firstClick` to the global `window` object. Moving the code inside of `$(document).ready(function () {..,}` (as the first lines) solves the problem. – Oleg Feb 20 '16 at 12:47
  • @ivish: Seconds I strictly recommend you to use `"use strict";` as the first line inside of your on top function: ``$(document).ready(function () {"use strict"; ...}`);` It prevents your from some errors. Your current code use `$("#itemList").jqGrid({`..., `sortname: "Id"`, sortorder: "asc", ..., sortname: "id", sortorder: "desc",...});`. The object can't have multiple values for the same properties `sortname` and `sortorder`. Such errors will be detected if you would use `"use strict";`. – Oleg Feb 20 '16 at 12:48
  • @ivish: You should remove `shrinkToFit: true, sortorder: "asc", postData: {}, ondblClickRow: function(rowId){}, sortname: "id",sortorder: "desc",` and remove `loadError`. There are default implementation of `loadError` in free jqGrid. Other options have default values. Your grid have no column with `"id"` or `"Id"` property and so the value of `sortname` property is wrong. By the way, do you implemented **server side sorting** in `"${pageContext.request.contextPath}/billing/medicines"`? If not and you want to sort the server response by `sortname` then you can use `forceClientSorting: true`. – Oleg Feb 20 '16 at 12:52
  • @ivish: You can remove `align: "left"``from all columns and remove `editable: true`. If more as 50% columns have `editable: true` then you can change the default value of `editable` property by usage `cmTemplate: {editable: true}` and include `editable: false` in the columns which needed be not editable. Which property of input data contains *native* id of your data? If it's `itemId` property then you should add `key: true` in the column `itemId`. If it's `itemDetailId` then you can add `prmNames: { id: "itemDetailId" }` – Oleg Feb 20 '16 at 12:57
  • @ivish: You should not overwrite `beforeSend` *globally* by usage `$.ajaxSetup`. Instead of that you can use `ajaxRowOptions: { beforeSend: myTokenSetting }, loadBeforeSend: myTokenSetting` where `var myTokenSetting = function(jqXHR) { jqXHR.setRequestHeader("X-CSRF-TOKEN", $("input[name='_csrf']").val()); }`. Additionally I don't understand why you use **different** options `editurl: ".../saveItem"` and `"url" : ".../editItem"`. – Oleg Feb 20 '16 at 13:03
  • @ivish: It seems to me that you should remove `editparameters` and `saveparameters` and use `$("#itemList").jqGrid('inlineNav',"#itemListPager");`. Your resulting code could be more reduced and cleaned up. For example you can remove `
    `, replace `pager: "#itemListPager"` to `pager: true` and skip `"#itemListPager"` from parameters of `navGrid` and `inlineNav`.
    – Oleg Feb 20 '16 at 13:09
  • @ivish: You can remove `{autoSearch: true, stringResult: true, searchOnEnter: false, defaultSearch: 'cn'}` from parameters of `filterToolbar` and add the option `searching: { searchOnEnter: false, defaultSearch: 'cn' }`. You can use `navOptions:{add: false, edit: false}, inlineNavOptions: {add: true, edit: true}`. After the changes your code can look like `$("#itemList").jqGrid({/*jqGrid options*/}).navGrid().inlineNav().filterToolbar().gridResize({ minWidth: 450, minHeight: 150 });` The most default values of other jqGrid methods you can move to parameters of jqGrid. – Oleg Feb 20 '16 at 13:18
  • @ivish: I would recommend you to use `template: "number"` property for the columns `availableQuantity`, `price`, `quantityPerUnit` and ti use `template: "integer"` for the column `itemType`. It will add all standard propertied for float and integer numbers. Sorting, formatting and filtering will be correctly. You can add `align: "left"` additionally to `template: "number"` if required. The current setting miss `sorttype: "number"` or `sorttype: "integer"`. See [the lines](https://github.com/free-jqgrid/jqGrid/blob/v4.12.1/js/jquery.fmatter.js#L62-L81) which defined the properties of templates. – Oleg Feb 20 '16 at 13:35
  • @ivish: You input data contains `itemDetailId`, `itemDesc` and `subUnit` properties. Do you need to hold the information locally? `loadonce` saves locally by default only the data from `colModel`. You can extend the data by usage the option `additionalProperties["itemDetailId","itemDesc","subUnit"]` or `additionalProperties[{name: "itemDetailId", sorttype: "integer"},"itemDesc","subUnit"]`. You can use `getLocalRow` to access to full properties of the item by rowid. You and access the information from `itemDesc` for creating custom tooltips, for example. – Oleg Feb 20 '16 at 13:40
  • Hello Oleg, thanks again for your guidance. I have modified code to incorporate most of your suggestions (UPDATE 3). But in the strict mode i am getting a JS error - "Uncaught ReferenceError: saveparameters is not defined". I have carefully looked at the saveparameters array but can't see any problem there. Also i am trying to get ajaxRowOptions to work as suggested by you. If i remove editparameters and saveparameters i would not be able to use add and edit specific URLs for add and edit operations. That's why i am using it. – ivish Feb 20 '16 at 13:44
  • @ivish: You don't need `saveparameters`, and `editparameters` as I wrote in another comment, but if you do need the variables then you should use `var saveparameters = {...};` and `var editparameters = {...};` The code without `var` interprets the variables as **global** and assigns `saveparameters` and `editparameters` as properties to `window` object. It could be origin of errors. For example you could forget `var` for `i` variable in two parts of your code and one part of your code will change the `i` which you use inside of loop. Such error is very difficult to find. – Oleg Feb 20 '16 at 13:46
  • Yes, you are absolutely correct. Adding 'var' to saveparameters resolved the issue. Thanks – ivish Feb 20 '16 at 13:51
  • @ivish: You are welcome! you should replace `formatter: "number",},` to `formatter: "number"},` too and to consider to reduce the code more based on the above suggestions. The smaller the code the more easy to read, to understand and to maintain it. – Oleg Feb 20 '16 at 13:54
  • @ivish: By the way, I prepared new version 4.13.0 for publishing. I will publish it today later and tomorrow you can refresh your sources. – Oleg Feb 20 '16 at 13:58
  • Yes, of course. I am doing other changes as per your comments. I will take the latest free jqGrid source tomorrow. – ivish Feb 20 '16 at 14:00
  • Hi Oleg, i observed one issue in my code posted in last update. If i remove 'editurl' property then server side call is not made after adding a row. I was thinking after adding a row a server side call should be made to the URL specified in the saveparameters array. But it doesn't happen. But in case of edit row a server side call is made to the URL mentioned in the editparameters. I have doubly ensured that saveparameters array is as per the specification here - http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing – ivish Feb 20 '16 at 15:15
  • @ivish: I wrote you above that I recommend you to remove `saveparameters`. I didn't wanted to point you to all errors and not perfect places in your code, but if you ask me about `saveparameters` then: You use the object as the value for `addParams` parameter which us **wrong**. If you want to use it then you should fix the code to `addParams: {addRowParams: saveparameters}`. It would be the only correct way (see [the documentation](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#addrow)), but it's difficult to read. Thus I suggest to us `inlineEditing` option of jqGrid. – Oleg Feb 20 '16 at 15:23
  • yes it works with addParams: {addRowParams: saveparameters}. But i will try to use inlineEditing. Thank you – ivish Feb 20 '16 at 15:32
  • This inlineEditing option in free jqGrid is really a huge improvement. I remember this redundant coding issue all the time in the old version. Thanks Oleg! – jeffery_the_wind Sep 19 '17 at 10:13
  • 1
    @jeffery_the_wind: You are welcome! I find too that the options `inlineEditing`, `formDeleting`, `formEditing`, `formViewing`, `searching`, `reloadGridOptions`, `navOptions`, `actionsNavOptions`, `inlineNavOptions` simplify maintain of jqGrid and make the code more short and readable. – Oleg Sep 19 '17 at 10:19
  • @oleg I am just looking for documentation about, for example, the proper format of the inlineEditing option (like what parameters it can accept), as well as navOptions etc, so I can set up the grid. I haven't really found it through google. Also now I am looking through the code but haven't really found it yet, any help is greatly appreciated. Thanks. – jeffery_the_wind Sep 19 '17 at 10:28
  • @jeffery_the_wind: `inlineEditing` can specify **any inline editing options** (options of `editRow`, `saveRow`, `addRow`, `restoreRow`). Creating and maintain of documentation take many time. I maintain currently only in TypeScript format. See [here](https://github.com/free-jqgrid/jqGrid/blob/v4.15.0/ts/free-jqgrid.d.ts#L1468-L1511) the documentation of `InlineEditingOptions`. See [here](https://github.com/free-jqgrid/jqGrid/blob/v4.15.0/js/grid.inlinedit.js#L103) like `editRow` combine default options with the options from `$.jgrid.inlineEdit`, `inlineEditing` of grid and the current options – Oleg Sep 19 '17 at 10:34
  • OK perfect, I like that TypeScript and I see that about those options. Great well I know the documentation takes a lot. I am def could improve a lot on my documentation habits. Thanks for all your work. – jeffery_the_wind Sep 19 '17 at 10:54
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/154784/discussion-between-jeffery-the-wind-and-oleg). – jeffery_the_wind Sep 19 '17 at 11:16
  • @Oleg please check this out: https://stackoverflow.com/questions/46299187/free-jggrid-show-add-button-on-pager thanks! – jeffery_the_wind Sep 19 '17 at 11:24