Skip to content Skip to sidebar Skip to footer

Jqgrid - Aftersavefunc Being Called Before Saverow

I have a jqGrid that allows inline editing/adding of data. When a user double clicks on the row, inline edit starts. When the user presses enter or clicks on another row, I want

Solution 1:

i think you need to add more functionality to your onSelectRow function

onSelectRow: function (id) {
        if (id && id !== lastsel) {
        // cancel editing of the previous selected row if it was in editing state.// jqGrid hold intern savedRow array inside of jqGrid object,// so it is safe to call restoreRow method with any id parameter// if jqGrid not in editing stateif (typeof lastsel !== "undefined") {
        jQuery("#grid").jqGrid('restoreRow', lastsel);
        }
    lastSel = id;
    }
    }, 

in this code i'm not doing editing on selecting the row, but you can see that you need to restore the previous selected row, if that row was in edit mode and you click on some other row.

Try this.

Post a Comment for "Jqgrid - Aftersavefunc Being Called Before Saverow"