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
afterSubmitCell example
20/11/2008
03:00
Avatar
birt
Member
Members
Forum Posts: 20
Member Since:
20/11/2008
sp_UserOfflineSmall Offline

I'm new to jqGrid but really likes it!

Right now I'm am struggling with celll editing and the afterSubmitCell event. I think I understand it's functionality but I can't see how I should write the code...    Is there anyone who could post some sample code that can be used to take care about the serverresponse? Both in the grid and on the server side. 

Thanks in advance.

21/11/2008
03:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Look at the examples - the afterSubmitCell have the same sence

as afterSubmitForm in formedit

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

21/11/2008
07:47
Avatar
birt
Member
Members
Forum Posts: 20
Member Since:
20/11/2008
sp_UserOfflineSmall Offline

Tony,

Thanks for a quick reply. I studied both examples and quite a lot of posts in the forum regarding the "afterSubmit".

My afterSubmitCell function right now looks like, but there is no msgbox coming up.

 afterSubmitCell: function(serverStatus, aPostData) {
  var response = serverStatus.responseText;
  alert(response);
  return [false,response,""];
 }

Two questions:

1.) Is the functionality of afterSubmitCell exactly the same as for afterSubmit?? 

2.) It might be a stupid question but I really can't find out how I should write the code in PHP that will generate the response.

21/11/2008
08:38
Avatar
YamilBracho
Member
Members
Forum Posts: 124
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

I use this format to send a response (I use json):

{ status:boolean_value, message:"Your message_here"}

For example:

{ status:true, message:"Your data was updated OK"}

In my javascript I do:

              jQuery.get(url, function(data) {
                  var objStatus = eval('(' + data + ')');
                  alert(objStatus.message);

                  // Refresca Grid
                  jQuery("#list").trigger("reloadGrid");
              })

HTH

24/11/2008
08:33
Avatar
birt
Member
Members
Forum Posts: 20
Member Since:
20/11/2008
sp_UserOfflineSmall Offline

Ok, I got it!

Thanks a lot for your help!!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
63 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