Grid cell acheck confirm action

I have a grid with an acheck column. On selecting one of the cells in the column (check or uncheck) it initiates a confirm message by an ‘onCheck’ event. How can I delay the action of the acheck until the user confirms it or cancel the action if the user chooses cancel?

Unfortunately it is not available to block the checking with the “onCheck” event, as it occurs after the checkbox is checked.
But you may try to use the onEditCell event to block the checking procedure if it’s needed:
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html

Sematik, thank you for your response.

I am trying to use the onEditCell as you suggested. When, using it without a confirmation message, it works:

myGrid.attachEvent('onEditCell', function(stage,id,ind){
  if(ind==5) return false;
  return true;
});

The cells are prevented from submitting, however, I need them to submit after a confirmation has been made or cancel if canceled. When I try to add that, I cant seem to get the return to work:

myGrid.attachEvent('onEditCell', function(stage,id,ind){
  console.log('Stage: '+stage);
  if(ind==5){
    dhtmlx.confirm({
       id: 'confirmSub',
       title: 'Confirm',
       type: 'confirm-error',
       cancel: 'Cancel',
       ok: Confirm',
       text: 'Submit?',
       callback: function(value){
         //console.log(value);
         return value;  // this value is never returned
       });
    }
    return true;
});

The confirmation message appears but the acheck submits and advances to stage 1 without waiting for the Confirm button to be clicked.

Any suggestions to my reply?