Categories | Question details Back To List | ||
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 ? Answer posted by dhxSupport on Jan 09, 2009 08:04 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 Answer posted by Bert on Jan 12, 2009 00:58 a) and b) are forefilled but it doesn't fire. Full code : test.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script src../grid_codebase/dhtmlxcommon.js"></script> <script src../codebase_dataprocessor/dhtmlxdataprocessor.js"></script> <script> <body> //load dataprocessor </script>
//set content type and xml tag print("<!-- response xml -->\n"); Answer posted by Support on Jan 12, 2009 03:10 Please try to include attached js file in addition to dhtmlxdataprocessor.js and if issue still occurs - provide content of debug console. Attachments (1) Answer posted by Bert on Jan 12, 2009 03:21 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. |