Hi,
I am using dhtml DataProcessor for updating the data in DB,
I tried to update multiple rows at once in DB, I have used the method myDataProcessor.setTransactionMode(“GET”,true),
So while I am sending the request to server I am able to debug multiple rows are moving to server.
But while response came from the server, It is updating the first row which I updated and it automatically sending another request to server to process the other rows again.
I am sending the response from server as :
My Code follows below:
if(typeof(mygrid) == “undefined”){
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setHeader(levelHeader);
mygrid.attachHeader(header);
mygrid.setColumnIds(columnIds); // here the ID’s of columns need to be set
mygrid.setInitWidths(intiWidths);
mygrid.setColTypes(colTypes);
mygrid.setColSorting(colSorting);
mygrid.setImagePath(“images/treeImgs/”);
mygrid.enableSmartRendering(true);
mygrid.setAwaitedRowHeight(25);
mygrid.setEditable(mygrid.isEditable);
mygrid.setSkin(“xp”);
mygrid.init();
//function called when editing of a cell
mygrid.attachEvent(“onEditCell”,function(stage,id,ind,value){
if (stage==2) {
var type = mygrid.fldSort[ind];
var columnId = mygrid.getColumnId(ind);
if (!some_check(value,type,columnId)) {
alert(“incorrect data”);
return false;
}
}
return true;
})
mygrid.attachEvent(“onXLS”,function(){
//show loading message here
document.getElementById(‘message’).style.display=‘block’;
})
mygrid.attachEvent(“onXLE”,function(){
//hide loading message here
document.getElementById(‘message’).style.display=‘none’;
})
mygrid.clearAll();
//before loading set cursor to default
document.body.style.cursor=‘default’;
mygrid.loadXML(‘fetchGridData.do?methodName=loadGrid&prm1=’+param1+’&prm2=’+param2);
//============================================================================================
myDataProcessor = new dataProcessor(‘fetchGridData.do?methodName=loadGrid&prm1=’+param1+’&prm2=’+param2);
myDataProcessor.enableDebug(true);
myDataProcessor.enableDataNames(true);
myDataProcessor.setUpdateMode(“off”);//available values: cell (default), row, off
myDataProcessor.defineAction(“error”,myErrorHandler);
myDataProcessor.defineAction(“insert”,setUserDataFunction);
myDataProcessor.defineAction(“delete”,setDleteFunction);
myDataProcessor.defineAction(“update”,setUserDataFunction);
myDataProcessor.setTransactionMode(“GET”,true);
myDataProcessor.init(mygrid);
setGlobalUserData(colNullable);
//============================================================================================
}
Can u please help me to solve the above problem?
/Thanks
Raj
Please be sure that response sent with correct content-type - text/xml
The mentioned problem may occur if response sent with incorrect
content-type - in such case component will be able to detect only first
“action” tag in response.