Issue on grid with checkbox and afterEditEnd

Hi all,
I want to enable changing checkbox only if some conditions are respected.

https://snippet.dhtmlx.com/6bm4egsx

In my example,
when checking the checkbox,
it the country is ‘China’, i can check it and uncheck it : it’s correct
it the country is ‘China2’, i want to reject enabling it, so i show an alert (it’s ok), but the return false; don’t work : the checkbox is checked

I must do something wrong, any idea ?

You should use the beforeEditEnd/beforeEditStart events if you need to block the edit process, not the afterEditEnd, as this event triggers after the edit process is finished:
https://snippet.dhtmlx.com/dkmiii5i