Check condition and stop event from firing

Tags: #<Tag:0x00007f8b28c1dfa8>

Hi,
I wan’t to know if there is a way to stop the merge event from firing after checking a certain condition during “beforeMergeCells” callback.

Good day @shajibaig

I have requested a similar option but to generally block cell meta changes via beforeSetCellMeta hook https://github.com/handsontable/handsontable/issues/5388

The beforeMergeCells hook does not work in a way it can block merging https://jsfiddle.net/handsoncode/87cjdz2g/4/ You just get a console error.

If you, however, have a rule that does not allow to merge cells in some defined coordinates to can use the disabled option via custom context menu. Here is an example http://jsfiddle.net/oku5ypmr/ (check the first row to see a disabled option).

1 Like

Thank you very much @aleksandra_budnik . This technique will also work for my project.

You’re welcome @shajibaig