Editing cell values, causing multiple calls to server

Hello,

I am doing cell edit in dhtmlxgrid, and when I am editing in second cell then it is making two calls to server. below is the code that I am using. Please suggest.

function updatePlayerInfo(rId, cInd) {
//alert(eventId);
var rowId = rId;
var cellInd = cInd;
var mygrid = gridboxPlayers;
var updatedCellValue = mygrid.cells(rowId, cellInd).getValue();
var mod = {colInd: cInd, colVal: updatedCellValue};
var modupd = JSON.stringify(mod);

var url = '/dq/support/update?t=up&u=' + rowId + "&mod=" + modupd;
var dp = new dataProcessor(url);

dp.init(mygrid);
dp.setUpdated(rowId, true);
console.log("updated sucessfully"+rowId);
dp.defineAction("updated", function(response) {
    console.log("updated sucessfully"+rowId);
    var error = response.getAttribute("extra");
    updateErrorColumns(error, mygrid, rowId);
    dp.setUpdated(rowId, false);        
    return false;
});

}

you are initializing the dataprocessor in the update function, which is wrong, as after second function call you will have 2 active dataprocessor, which will track changes and may send requests to a server side.