Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Darren Bowen on May 21, 2007 13:53
open dhtmlx forum
Can dhtmlXDataProcessor submit the contents of just the cell instead of the entire row.

Hello,

We are using dhtmlXDataProcessor.js to submit grid updates back to our own PHP server side back-end. We use dhtmlXDataProcessor in "cell" autoUpdate mode. Is there a way to make the processor just post the contents of the cell that was edited (or cells if several cells have to be edited before the row validates), or alternatively can it post an additional field which describes which cells have changed.

The reason is that if the user updates one cell then I don't want to have to update every field in the database with information that hasn't changed.

Many thanks.
Answer posted on May 22, 2007 14:51
dataProcessor sends all assigned userdata with request, so you can use it

grid.attachEvent("onEditCell",function(stage,rid,cid){
    if (stage==1)
         grid.setUserData(rid,"cell_updated",cid);
    return true;
});


as result you will got cell_updated parameter on server with index of last edited cell in this row.

more complex rules can be created by modification dataProcessor js file. The getRowData function here collects row data, you can modify it so it will send only necessary cells.
Answer posted by Darren Bowen on May 23, 2007 13:37
Awesome, that's exactly what I needed, also in case it helps others if you are using named columns instead of numbered columns then you can use the following to submit the column name of the cell that changed.

grid.attachEvent("onEditCell",function(stage,rid,cid){
    if (stage==1)
         grid.setUserData(rid,"cell_updated",grid.columnIds[cid]);
    return true;
});
Answer posted by Andrei (Support) on Nov 28, 2014 11:01

To find more precise comments upon this issue, we can offer you read about free scheduling calendar and xmlhttp.status 500.