Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Darren Bowen on May 21, 2007 15:11
open dhtmlx forum
dhtmlxDataProcessor - Updating a Cell when the request response comes back from the server

Hi,

Is it possible to have a cell change its value when another cell is updated in the same row? For example if I want one cell to be the result of a complex server side calculation involving some of the other cells.

Ideally what I'm looking for is something which works as follows:

1) User updates a cell in the grid
2) Using the auto update method the grid sends the new values in the row to the server via an AJAX call.
3) The server sends xml back to the grid stating the recalculated values of cells within the row.
4) The grid updates itself based on the server's response.

Furthermore is there any documentation on dhtmlxDataProcessor.js other than the example in the samples folder?

Thanks.
Answer posted on May 22, 2007 14:19
You can implement your own callback events,
on client side
    dp.defineAction("my_update",my_handler);
on server side, in case of error you can return
    <data>
        <action type="my_update">
            any info
        </action>
    <data/>

in such case my_handler function will be executed on client side, it
will get an action tag object as incoming parameter. Returning false
from my_handler will prevent default event processing.

You can also redefine existing event    
    dp.defineAction("update",my_handler);
    function my_handler(xml_node){
        //any custom actions here
       //xml_node contain response XML - so you can transfer any parameter from server side
        return true;
    }
in such case the my_handler will be called after update operations,
returning true from custom handler will cause default update actions in
tree.
Answer posted by sematik (Support) on Nov 30, 2014 01:43

The information connected with calendar dhtml and upload component also can help you, so please check it too.