I have to edit a row in Jqgrid. When I try to select any row it is getting saved even when I not do any changes in that row. I need to select a row and It should save only when I do any changes. Can anyone help me for this issue. Below is the code.
//for inline edit
$('#PayorList').setGridParam({
onSelectRow: function(id){
if(id && id != lastSel){
//save changes in row
//$('#PayorList').restoreRow(lastsel);
$('#PayorList').saveRow(lastSel, succesfunc,'','',aftersavefunc );
lastSel=id;
}
//trigger inline edit for row
$('#PayorList').editRow(id, true,oneditfunc, succesfunc,'','',aftersavefunc);
}
});