Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Setting contentType for form edit
07/12/2010
19:24
Avatar
jdege
Member
Members
Forum Posts: 8
Member Since:
03/12/2010
sp_UserOfflineSmall Offline

I'm trying to get form edit to work, against a .ASMX web service.  For this to work, I need to set the contentType on the ajax request to "application/json".

I can see where, in grid.formedit.js, the function postIt() constructs an ajaxOptions object, by extending $.jgrid.ajaxOptions and rp_ge.ajaxEditOptions.  My problem is that when I step through the code, both of these objects are empty. 

I've set ajaxOptions, ajaxGridOptions, ajaxRowOptions, and ajaxEditOptions on the grid, and none of these seem to be picked up by either $.jgrid.ajaxOptions and rp_ge.ajaxEditOptions in formedit's postIt().

Where do I need to set contentType, so that it is used in the ajax call after editing an edit form?

07/12/2010
19:45
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Look at here and here. I hope this example will be enough to make your code working.

Best regards
Oleg 

07/12/2010
22:01
Avatar
jdege
Member
Members
Forum Posts: 8
Member Since:
03/12/2010
sp_UserOfflineSmall Offline

I click the "Submit" button, and I'm getting to the webservice on the server, and getting the data back.  The grid updates fine, but the edit form never closes.  Do I need to provide an explicit success function, to close the edit form?

07/12/2010
22:27
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Look at edit form settungs. I recommend you to change the settings for all edit/add form dialogs in the following way:

jQuery.extend(jQuery.jgrid.edit, {closeAfterAdd: true,closeAfterEdit: true,recreateForm: true});

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information