Deleterow confirm message

I want to add a confirm-message before deleting a row. I do this by using mygrid.setOnBeforeRowDeletedHandler.



The message works, but if my handler return false, so that the row is not deleted, then the text in the row still has the strike-trought style.

This is result of dataprocessor work , it handles onBeforeRowDeletedevent as well so returning false doesn’t affect it , you can try to use next code

grid.attachEvent(“onBeforeRowDeleted”,function(id){
    if (!confirm(some)){
       window.setTimeout(function(){   // to resolve timing issues
           dataproc.setUpdated(id,false);   //remove update mark
            grid.setRowTextStyle(id,“text-decoration : none;”);
       },1);
       return false;
    }
    return true;
})

This is working expect for one small detail. The confirmation message is triggered twice…

Yep, it possible because of dataprocessor ( the second time it generated when delete confirmation retrieved from server )
You can update code as

grid.attachEvent(“onBeforeRowDeleted”,function(id){
    if (grid.getUserData(id,"!nativeeditor_status")==“true_deleted”) return true;

Now the row is deleted without any questions. Here is my code:
mygrid.attachEvent(“onBeforeRowDeleted”,function(id)
   {
       if (grid.getUserData(id,"!nativeeditor_status")==“true_deleted”) return true;
        if (!confirm(“Er du sikker på at du vil slette denne bestillingen?”))
        {
            window.setTimeout(function(){   // to resolve timing issues
             myDataProcessor.setUpdated(id,false);   //remove update mark
             mygrid.setRowTextStyle(id,“text-decoration : none;”);
               },1);
       return false;
         }
         
    return true;
     })