jqGrid editurl value for local editing?

2019-03-30 23:32发布

问题:

I have a jqGrid set up with local data. I'm not sending any data to the server until the entire form is filled out. My problem is, when a user adds/edits a row, jqGrid attempts to post the results to the server right then.

I tried leaving out the "editurl" attribute from the jqGrid invocation, but this results in a "No URL is set" error when the user clicks the "submit" button on the popup form for adding/editing records.

I tried putting in a single hash "#" for the editurl value, but this also fails.

Any thoughts?

回答1:

editurl must be 'clientArray' in your case.



回答2:

Set editurl:'url', cellsubmit:'clientArray', cellEdit: true

or

here



回答3:

See this for a complete example of jqgrid local data.

local edit on jqgrid

Change your initial data and your columnmodel, and you will be almost done.

It's not a oneline solution, but, seems this is the way to cope local editing.



标签: jqgrid