I have a main grid with sub grid. In the sub grid I have checkbox so that user can check and uncheck the row.
First time, I checked the checkbox on row 1 and onCheck event triggered and update my table successfully via sendData. This is fine.
Second time, I unchecked the checkbox on the same row. This is fine.
Third time, I checked the checkbox on the same row. Now, it does not trigger my sendData. Why this happen? I’m trying a whole day to figure out the problem but to no success. Need help from Support and members in this forum.
Below is my code
mygrid.attachEvent("onSubGridLoaded",function(sub,id,ind,value){
var dp = new dataProcessor("update.asp");
dp.setTransactionMode("POST", true);
dp.setUpdateMode("off");
dp.init(sub);
sub.attachEvent("onCheck",function(rowId, cellInd, state){
if (state){
dp.setUpdated(rowId, true);
dp.serverProcessor = 'update.asp';
dp.sendData();
alert("Checkbox in the row with id="+rowId+" was checked");
}
else {
dp.setUpdated(rowId, false);
alert("Checkbox in the row with id="+rowId+" was UNchecked");
}
})
});