senddata() will execute more then 1 time

I want do following things:

  1. send all grid data to server side by manually
    (through a hyperlink: sendit)

  2. after server processed, then pass back a action type tell me the results: many rows)

but
senddata() will execute more then 1 time

var mygrid = dhxLayout.cells(“b”).attachGrid(0);
mygrid.setImagePath("…/dhtmlxSuite/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("Department,Name,mail,title,m,score ");
mygrid.setInitWidths(“100,80,*,0,0,0”);
mygrid.setColAlign(“left,left,left,left,left,left”);
mygrid.setColSorting(“str,str,str,str,str,int”)
mygrid.setSkin(“modern”);
mygrid.enableRowsHover(true,‘grid_hover’);
mygrid.enableEditEvents(false, false, false);

mygrid.init();
mygrid.loadXML(“SetTarget_get.aspx”);

myDataProcessor2 = new dataProcessor("SetTarget_update.aspx");
myDataProcessor2.setTransactionMode("POST", true);
myDataProcessor2.defineAction("inserted",myHandler_01);   
myDataProcessor2.defineAction("deleted",myHandler_01);   
myDataProcessor2.defineAction("updated",myHandler_02); 
myDataProcessor2.setUpdateMode("OFF");    
myDataProcessor2.enableDebug(true);
myDataProcessor2.init(mygrid);  

function myHandler_01(tag)
{
alert(“message one !!”);
return false;
}

function myHandler_02(tag)
{
alert(“message two !!”);
return false;
}

defineAction(“inserted”,myHandler_01);
defineAction(“updated”,myHandler_02);

This is expected behavior if you add rows, edit it and then send data to the server side. In such case dataProcessor will log 2 actions: “inserted” first, then “updated”.

This is expected behavior if you add rows, edit it and then send data to the server side. In such case dataProcessor will log 2 actions: “inserted” first, then “updated”.

  1. even set myDataProcessor2.setUpdateMode(“OFF”) still is expected behavior ?

  2. after deleted 2 records, then senddata to server side. will Infinite loop


  1. even set myDataProcessor2.setUpdateMode(“OFF”) still is expected behavior ?
    Yes, this is expected behavior event if autoupdate mode is off
  1. after deleted 2 records, then senddata to server side. will Infinite loop
    Unfortunately we cannot reproduce this issue locally. What version of DataProcessor are you using? You can download latest version here dhtmlx.com/docs/download.shtml
  1. I am using pro version : dhtmlxSuite_2008Rel3_pro_81009

  2. once use newest dataprocessor version, will occur “run time error, need object” error


senddata() will execute more then 1 time
Sorry for inconvenience. If you are using “send all rows at once”, this is not expected behavior. BTW this issue wasn’t reproduce locally. You can check working example here dhtmlx.com/docs/products/dht … _once.html

This example is included at the Standard package which you can download here dhtmlx.com/docs/download.shtml
You may attach dhtmlxdataprocessor_debug.js file and check at debug that only one request sends to the server side

once use newest dataprocessor version, will occur “run time error, need object” error
Latest version of DataProcessor is incompatible with with dhtmlxGrid 2.0 version. You should update your version of dhtmlxGrid.