dataprocessor setOnAfterUpdate

The function dhxDataProcessor.setOnAfterUpdate isn’t being executed and I can’t see why it wouldn’t.



Code snippet :



//load grid in layout

    dhxGrid = dhxLayout.cells(“c”).attachGrid();

    dhxGrid.setImagePath/grid_codebase/imgs/");

    dhxGrid.enableDistributedParsing(true, 20, 50);

    

    //load dataprocessor

    dhxDataProcessor = new dataProcessor(“dpgrid.php”);

    dhxDataProcessor.setTransactionMode(“POST”);

    dhxDataProcessor.init(dhxGrid);

    

    //set OnAfterUpdate Event

dhxDataProcessor.setOnAfterUpdate(function(){ alert(“single row updated”); });



When I change a cell value it is perfectly update in the database but the event is not fired.



What is wrong ?

Function defined by setOnAfterUpdate will be called only when
a) valid response received ( valid XML )
b) xml contains<action type=“delete”, <action type=“delete”, <action type=“insert”, <action type=“update”, it may not be called in case of custom action type


a) and b) are forefilled but it doesn’t fire.



Full code :



test.php



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "w3.org/1999/xhtml">

<link rel=“stylesheet” type=“text/css” href…/grid_codebase/dhtmlxgrid.css" />
<link rel=“stylesheet” type=“text/css” href…/grid_codebase/skins/dhtmlxgrid_dhx_blue.css" />     



<script src…/grid_codebase/dhtmlxcommon.js">
<script src…/grid_codebase/dhtmlxgrid.js">
<script src…/grid_codebase/dhtmlxgridcell.js">



<script src…/codebase_dataprocessor/dhtmlxdataprocessor.js">
<script src…/codebase_dataprocessor/dhtmlxdataprocessor_debug.js">






Untitled Document













update.php



//set content type and xml tag
if(stristr($_SERVER[“HTTP_ACCEPT”],“application/xhtml+xml”))
 header(“Content-type: application/xhtml+xml”);
else
 header(“Content-type: text/xml”);
print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");



print("\n");
print("\n\t");
print("");
print("");


Please try to include attached js file in addition to dhtmlxdataprocessor.js and if issue still occurs - provide content of debug console.
dhtmlxdataprocessor_debug.zip (1.82 KB)


ok now



Problem was in my dhtmlxdataprocessor_debug.js file on line 63 : if (!atag || !atag.tagName) return that._log(“Not a XML”);



Your attached js file doesn’t have this line.



Thanks for the support.