I'm using the autosave example
http://paramquery.com/pro/demos/editing_instantand the nested grid example
http://paramquery.com/pro/demos/nestingthe nested grid have the same toolbar that the parent grid.
My saveChanges function:
function guardar_cambios(grid) {
//attempt to save editing cell.
if (grid.saveEditCell() === false) {
return false;
}
//if ( grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid ) {
if (!$.active && !grid.getEditCell().$cell && grid.isDirty() && grid.isValidChange({ allowInvalid: true }).valid) {
var cambios = grid.getChanges({ format: "byVal"});
var pathName = window.location.pathname;
var recIndx = grid.options.dataModel.recIndx;
var url = pathName + '/guardar_cambios';
if(grid.options.sufijo){
url = url + grid.options.sufijo;
}
//console.log(cambios);
$.ajax({
dataType: "JSON",
type: "GET",
async: true,
context: grid,
url: url,
data: { listas: JSON.stringify(cambios) },
beforeSend: function (jqXHR, settings) {
grid.showLoading();
},
success: function (cambios) {
grid.commit({ type: 'add'});
grid.commit({ type: 'update'});
grid.commit({ type: 'delete'});
//grid.refreshDataAndView();
},
complete: function (cambios) {
grid.commit();
grid.hideLoading();
grid.refreshDataAndView();
},
});
}
}
i tried use a loop like a for, to iterate all the rows in the grid, and can use refreshRow({rowIndx: i }), but not working, also i tried use updateRow, whith the same result.