Hi,
i use the dataprocessor, but it don’t trigger the onFullSync Event.
ATTENTION : i tried the latest version of dataprocessor in the knowledge base (version of 5 or 6 May 2009 : no build version inside) and the initial version of build 90226
the 2 don’t works
This is the source code
myDataProcessor = new dataProcessor("./Cra.do?reqCode=updateCra&xml&periode="+nm_periode);
// Avoiding Style problem of dataprocessing
//myDataProcessor.attachEvent(“onRowMark”,function(){ //dp - instance of dataprocessor 2.1+
// return false;
// });
myDataProcessor.attachEvent(“onFullSync”,function(){
alert(“Called”);
});
myDataProcessor.setUpdateMode(“off”);
myDataProcessor.setTransactionMode(“POST”,true);
myDataProcessor.enableDebug(true);
myDataProcessor.init(mygrid);
The function called to trigger the event (after updating a row):
myDataProcessor.sendData();
The log of the debug mode : All is ok !!!
row 1 marked [updated,valid]
Initiating data sending for all rows
Sending all data at once
Server url: ./Cra.do?reqCode=updateCra&xml&periode=200905 parameters
1_gr_id=1
1_c0=SCAPIN%20-%20FBM%20-%20AV1
1_c1=
1_c2=
1_c3=
1_c4=1
1_c5=1
1_c6=1
1_c7=1
1_c8=
1_c9=
1_c10=
1_c11=1
1_c12=1
1_c13=1
1_c14=1
1_c15=1
1_c16=
1_c17=
1_c18=1
1_c19=1
1_c20=1
1_c21=1
1_c22=1
1_c23=
1_c24=
1_c25=1
1_c26=1
1_c27=1
1_c28=1
1_c29=1
1_c30=
1_c31=
1_c32=19
1_!nativeeditor_status=updated
ids=1
Server response received details
<?xml version="1.0" encoding="ISO-8859-15"?>
Action: update SID:1 TID:1
row 1 unmarked [updated,valid]
–> the update of the row is ok !!! i update only this row
Do you have an idea ?
Thanks
There was a bug with onFullSync event in original version of dataprocessor ( event may not occur in some situations )
Fixed version available at
dhtmlx.com/docs/products/kb/inde … onFullSync
If it still not works for you - you can try to use next code snippet instead of it
dp.attachEvent(“onAfterUpdateFinish”,function(){
//after each update
if (!this.updatedRows.length){
//there is no more rows to update
… on full sync code here …
}
})
The fixed version don't solve the problem.
but the proposed code do it.
but the proposed code do it.
dp.attachEvent("onAfterUpdateFinish",function(){
//after each update
if (!this.updatedRows.length){
//there is no more rows to update
... on full sync code here ...
}
})
//after each update
if (!this.updatedRows.length){
//there is no more rows to update
... on full sync code here ...
}
})
so it's ok !
thanks a lot.