jqgrid saverow related help needed
This is a grid im currently working on
var lastsel;
grid.jqGrid({
url:'grid_data_loader.php,
datatype: 'json',
mtype: 'POST',
colNames:['ID','Date Created','Subject','Status','Location','Action'],
colModel :[
{name:'id', index:'id', align:'center', hidden:true},
{name:'date'},
{name:'subject'},
{name:'status',align:'center'},
{name:'location',editable: true, align:'center', edittype:"select",
editoptions: {
dataUrl: 'control.php',
dataEvents: [
{ type: 'change',
fn: function(e) {
grid.saveRow(lastsel,true);
}
}开发者_开发百科
]
}
},
{name:'action'}
],
rowNum:10,
rowList:[10,20,30],
autowidth: true,
height: "100%",
pager: '#pager',
sortname: 'id',
viewrecords: true,
rownumbers: true,
sortorder: "asc",
editurl: "control.php?case=8",
onSelectRow: function(id){
if(id && id!==lastsel){
grid.jqGrid('restoreRow',lastsel);
grid.editRow(id,true);
lastsel=id;
}
}
});
everything works fine but i can't figure how to check the server response after row is saved
any help would be great
Thanks
You can use aftersavefunc
and errorfunc
parameters of saveRow.
精彩评论