tags:

views:

455

answers:

2

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  A: 

editurl must be 'clientArray' in your case.

Oleg
I tried setting "editurl:'clientArray'", editurl: "'clientArray'", and various other things, but all I ever got was clientArray being treated as a literal URL. I googled up "jquery clientarray" and tried implementing it as shown elsewhere, but still got nothing. I'm working with a copy of jqGrid I dl'd just last week so it's pretty recent. I'm sure I'm just not setting it right, but I did come up with a band-aid fix.
Alan M
The band-aid fix is something I gleaned from http://www.trirand.com/blog/?page_id=393/help/problem-form-editing-for-clientarray/What I did was I set up a valid URL target that does nothing. editurl:'index.cfm?fuseaction=Ajax.doNothing'. I figure it made the pain stop, and if I do decide to use the client/server approach, I'll change my "doNothing" into a "doSomething".
Alan M
You `editurl:'clientArray'` is supported by inline editing, but it seems to me not in form editing. In case of form editing you probably should use a dummy ajax url like you do this. An example you can find on the demo page http://trirand.com/blog/jqgrid/jqgrid.html choose "New in version 3.7" and then "Add/edit/delete on local data"
Oleg