Forum


13:31

14/01/2009

This may sounds dumb, because it really is. I searched many places and couldnt find a clear description for the place where I should call afterSubmit once the field is edited and submit (I want to let users know if the record is saved or not)
My code is below (following the sample showed in doc)
jQuery(document).ready(function(){
var lastSel;
jQuery("#list").jqGrid({
url:'somelink.php',
datatype: 'json',
jsonReader : {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: true,
cell: "cell",
id: "id",
userdata: "userdata",
subgrid: {root:"rows",
repeatitems: true,
cell:"cell"
}
},
onSelectRow: function(id){
if(id && id!==lastSel){
jQuery('#list').restoreRow(lastSel);
lastSel=id;
}
jQuery('#list').editRow(id, true);
},
editurl: 'somelink.php?action=edit',
Any suggestion is really aprreciated. I've been pulling out my hairs *_*
02:39

Moderators
30/10/2007

Hello,
As of the docs the editRow has the following parameters.
editRow (rowid,keys,oneditfunc,succesfunc, url, extraparam, aftersavefunc,errorfunc)
Use succesfunc for this purpose.
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.
10:46

14/01/2009

Also, after digging into the doc, I found this
09:55

Moderators
30/10/2007

Hello,
Use eval to to parse the string to json data.
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.
19:14

14/01/2009

tony said:
Hello,
Use eval to to parse the string to json data.
Regards
Tony
Thanks Tony, that is what I will do now. BTW, can you also have a look at my other question here:
"if I rename the folder js to something else it doesnt work anymore, even when I correctly link jqModal and jqDnR, is there a setting for this or do I have to stick with 'js'?"
Thanks again for all your help
Raine
Most Users Ever Online: 715
Currently Online:
39 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