Forum
Topic RSS
02:10
Moderators
30/10/2007
OfflineHello,
See docs how to pass this.
Fomething like this
var myaftersave = function(rowid, response) {
// here your code
}
and then
....editRow(rowid,false,'','','','',myaftersave)
Note that you do not need to call it with params
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.
13:07
22/03/2009
OfflineIt doesn't work. Where is my error :
function checksave(result) {
if (result.status != 200) {
return false;
}
if (result.responseText.substring(0,2) != "OK") {
return false;
}
return true;
}
function on_edit(result) {
return true;
}
var myaftersave = function (id){
jQuery('#list2').trigger('reloadGrid');
}
jQuery(document).ready(function(){
jQuery("#list2").jqGrid({
url:'agefos.php',
datatype: "json",
colNames:['numero facture','date facture', 'resto', 'numero action','montant ttc','reglement'],
colModel:[
{name:'numero facture',index:'numero_facture', width:180, align:"center" },
{name:'date facture',index:'date_facture', width:180, align:"center", formatter:"date" },
{name:'resto',index:'id_resto', width:180, align:"center"},
{name:'numero action',index:'numero_action', width:180, align:"center" },
{name:'montant ttc',index:'montant_ttc', width:180, align:"center", formatter:"currency", formatoptions:{thousandsSeparator:" ", suffix:" €"}},
{name:'reglement',index:'reglement_facture', width:180,align:"center",formatter:"checkbox", editable:true,edittype:"checkbox" }
],
pager: jQuery('#pager1'),
height:500,
rowNum:30,
rowList:[10,20,30],
imgpath: 'themes/sand/images/',
sortname: 'id_resto',
viewrecords: true,
sortorder: "asc",
caption: "Agefos",
onSelectRow: function(id){
if(id && id!==lastSel){
jQuery('#list2').restoreRow(lastSel);
jQuery('#list2').editRow(id, true,on_edit,checksave,'','',myaftersave);
lastSel=id;
}
},
editurl:'reglement.php',
}).navGrid('#pager1',{});
});
Thank you.
03:47
Moderators
30/10/2007
OfflineHello,
Since we have ajax here try with this:
var myaftersave = function (id){
setTimeout( function() { jQuery('#list2').trigger('reloadGrid');},1000);
}
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: 994
Currently Online:
23 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
Log In
Home