I’m using acheck excell.
onEditCell event fires but only stage 0 and stage 1, thus old_value and new_value are undefined in both cases.
Am I doing something wrong?
mysession.grid.attachEvent("onEditCell",function(stage,rowId,cellInd,new_value,old_value){
alert(stage+", "+rowId+", "+cellInd+", "+new_value+", "+old_value)
if (stage == 2){
var c = colonne.split(',');
var query = "update site."+mysession.id_website+"_"+mysession.archive+" set "+c[cellInd]+"='"+new_value+"' where "+c[1]+"='"+rowId+"'";
alert (query)
status.setText("saving ...");
var loader = dhtmlxAjax.post('/moduli/common/save.html','msg=saved&query=' + encodeURIComponent(query));
status.setText( loader.xmlDoc.responseText);
}
return true;
});
This is expected behavior. “onEditCell” event doesn’t fired 3rd time for “ch”, “ra” and “acheck” cell types. “onEditCell” fired 3rd time (stage 2) after cell editor is closed. By those cell types haven’t cell editors.
To check if the user changed cell value you may use “onCellChanged” event. docs.dhtmlx.com/doku.php?id=dhtm … ellchanged
Also, if you need send Ajax request to the server side to save data from grid you may use dhtmlxDataProcessor extension. The library monitors changes in the grid and uses a simple protocol to interchange with the server side code. Please check tutorial here dhtmlx.com/docs/products/dht … processor/
yes, it works, too well because it sends out an onchanged also when loading data. I’ve solved enabling onchanged only when grid is loaded.
I’m planning on using dhtmlxDataProcessor, thanks for links
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan