I have rows in a grid where one of the columns is of ‘ch’ type, i.e. checkbox. I am trying to use this field to indicate row selection for processing. It goes fine adding rows, however when unchecking a row again, I want that row to be taken off the DP updatedRows list and I want the style to go back to clear again. I tried accomplishing that with an event. However none of these operations have any effect on the DataProcessor. It seems to work within the event, however when I check the content of the DP during next event, it was like the previous had never run, almost like it was using a copy of the DP. Any idea what might be going on here? Could the setUpdated function be called in a following event to onEditCell?
oGrid.attachEvent("onEditCell", function (nStage, sRowID, nColIndex, oValueAfter, oValueBefore) {
var nState = this.getRowAttribute(sRowID, "RowChangeState");
var sState = this.DP.getState(sRowID);
if (nStage >= 1) {
var checked = this.cells(sRowID, nColIndex).getValue();
if (checked == true) {
this.DP.setUpdated(sRowID, true, "updated");
this.setRowAttribute(sRowID, "RowChangeState", enuChangeState.enuUpdated);
} else {
this.DP.setUpdated(sRowID, false);
this.setRowTextStyle(sRowID, this.DP.styles.clear);
this.setRowAttribute(sRowID, "RowChangeState", enuChangeState.enuNone);
}
}
return true;
});