user2375298
user2375298

Reputation: 1041

How to persist data when edit fails in jqgrid

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.

Upvotes: 1

Views: 115

Answers (1)

Oleg
Oleg

Reputation: 221997

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, ...}

Upvotes: 1

Related Questions