Forum


03:00

20/11/2008

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.
03:59

Moderators
30/10/2007

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.
07:47

20/11/2008

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.
08:38

08/09/2008

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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66