How to persist data when edit fails in jqgrid

115 views Asked by At

I perform jqgrid edit via formatter actions. And when the edit validations fails in server and I display the errors to user, I want to remain in the edit mode and save the user entered data. Is it possible. Please help.

1

There are 1 answers

5
Oleg On BEST ANSWER

You should use restoreAfterError: false option of inline editing. I recommend you to set the option by changing defaults of inline editing:

$.extend($.jgrid.inlineEdit, {
    restoreAfterError: false
});

Alternatively you can set restoreAfterError in formatoptions:

formatter: "actions", formatoptions: {restoreAfterError: false, keys: true, ...}