Forum


08:26

20/02/2009

Hello,
I want update my database on mysql after update data on my grid.
I write this code, but it do nothing except bugging firefox
onSelectRow: function(invid){
if(invid && invid!==lastsel){
jQuery('#mygrid').restoreRow(lastsel);
jQuery('#mygrid').saveRow(invid,'/paiement/traitement/mise_a_jour_db.php',{'name:'invid',name:'invdate',name:'name',name:'amount',name:'tax',name:'tax',name:'total',name:'note'});
jQuery('#mygrid').editRow(invid,true);
lastsel=invid;
}
In red, it's my rowid, in pink it's my URL to programm to updating my database and in blue, it's my extraparameter.
I Have certainly an error in my script, Can you help me please to relsove it.
thank you.
Aurore
PS: I already read documentation but I don't understand how write saverow parameter?!
00:52

Moderators
30/10/2007

Hello,
The placef of parameters are wrong. If this will help here is:
saveRow : function(rowid, succesfunc, url, extraparam, aftersavefunc,errorfunc)
Hope this help. Refer to docs for the palce and order of parameters
Regsrds
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.
09:18

20/02/2009

Thank you TOny,
But I use another method. I use EDIT ROW such as bellow:
jQuery('#client').editRow(invid,true,pickdates,'','/paiement/traitement/mise_a_jour_bd.php',{'invid':+ret.invid},'',onerrorfunc);
because in the doc, it's writtent:
If keys is true, then the remaining settings -- succesfunc, url, extraparam, aftersavefunc and onerrorfunc -- are passed as parameters to the saveRow method when the [Enter] key is pressed (saveRow does not need to be defined as jqGrid calls it automatically). For more information see saveRow method below.
thank you for youor help. I sorry for this question because I'm a novice in informatic and web development.
Regards.
Aurore
02:31

Moderators
30/10/2007

Hello,
Try first with rowid only and then add parameters step by step to see what is it.
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.
Most Users Ever Online: 715
Currently Online:
54 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