onEditCell event overrides onCheck event

I am using checkboxes and normal text cells on my grid.

First I tested checkboxes with mygrid.attachEvent(“onCheckbox”,doOnCheck); and checkboxes worked fine.

Then I tested text edit cells with mygrid.attachEvent(“onEditCell”,doOnCellEdit); and edit mode worked fine.

But when I try to test the checkboxes again I got no answer from my doOnCheck function. Instead, I got answer from doOnCellEdit function. I know that because I got answer from doOnCellEdit on stage 0, but got no value of whether is checked or not.



If I comment the line mygrid.attachEvent(“onEditCell”,doOnCellEdit); everything works fine again with my checkboxes…

I understand that checkboxes are also liked with that event, but why is this happening?



Thanks in advance!


Please if your doOnEditCell function returns true:


function doOnEditCell(stage, rowId,cellInd,newVal,oldVal){
if (stage==0){
alert(“stage=0”);
}
if (stage==1){
alert(“stage=1”);

}
return true;
}



Excellent!

My doOnCellEdit did not return true.
After added that line now I got answer from doOnCheck function.

That means that you must return true for every function that is used by event handlers?

Excellent Job!!! Thank you!!!

That means that you must return true for every function that is used by event handlers?
dhtmlx.com/docs/products/dhtmlxG … rid_api_ev
All events placed in “before” column - blockable, not returning true from event handler will block default action related to event.

Right, that makes some sense…

Thanks for pointing me in the right direction.