Hello!
I’m looking to save edits FROM an edited-cell in a dhtmlxgrid TO the database that the grid is connected to.
Currently, when a cell is edited, the database is NOT updated with the change(s).
Here’s a snippet of code from the grid I’m using. I assume any code changes I need to make will be in the mygrid.attachEvent section…
mygrid.init(); //finishes initialization and renders the grid on the page
mygrid.loadXML("connector.php");
myDataProcessor = new dataProcessor("connector.php");
myDataProcessor.init(mygrid);
mygrid.attachEvent("onEditCell",function(stage){
if (stage == 2)
return true;
}
I CAN successfully ADD a NEW row using…
function add_r(){
var newId = (1);
var ind1=window.prompt(‘tickNumber’,’’);
if (ind1 === null || typeof ind1 == “undefined”) return;
var ind2=window.prompt(‘tickSubject’,’’);
if (ind2 === null || typeof ind2 == “undefined”) return;
var ind3=window.prompt(‘techName’,’’);
if (ind3 === null || typeof ind3 == “undefined”) return;
var ind4=window.prompt(‘clientName’,’’);
if (ind4 === null || typeof ind4 == “undefined”) return;
var ind5=window.prompt(‘timeWorked’,’’);
if (ind5 === null || typeof ind5 == “undefined”) return;
var ind6=window.prompt(‘dateWorked’,’’);
if (ind6 === null || typeof ind6 == “undefined”) return;
mygrid.addRow(newId,[ind1,ind2,ind3,ind4,ind5,ind6]);
mygrid.selectRow(mygrid.getRowIndex(newId),false,false,true);
}
I just want to UPDATE EXISTING rows/cells. It SEEMS simple, but I can’t figure it out.
Please help!
Thanks a bunch!!
Eric