free-jqgrid / jqGrid

jQuery grid plugin
https://github.com/free-jqgrid/jqGrid
Other
480 stars 195 forks source link

reloadDuringEditing breaking reloadGrid functionality #472

Open Djuwal opened 5 years ago

Djuwal commented 5 years ago

Upgraded to 4.15.5.

When using inline editing, I am having an issue with using:

            inlineEditing: {
                keys: true,
                position: "afterSelected",
                extraparam: { pid: pid },
                successfunc: function (rowid, res) {
                    **pngrid.trigger("reloadGrid"); // reload notes grid**
                } // end success
            } // end inline editing

The grid doesn't load, and this is because it enters the:

    if (p.savedRow.length > 0 && p.reloadingDuringEditing === "prevent") {
                        return false;
    }

statement inside of jquery.jqgrid.src.js .on("reloadGrid").

If I add reloadingDuringEditing and set it to 'cancel' or 'save' in my grid settings, it works fine, but if I leave it with prevent, I can save, but the grid doesn't reload because it enters the if statement and returns false.

For now, I am using cancel, but I'd like the functionality to be 'prevent' so users can't reload the grid while editing. I don't have the time to look into this now, but after I finish going through these next couple of sprints, I should be able to look into the issue more if you haven't gotten around to it by then.

Thanks, Oleg!