How to validate one checkbox column based on second

Tags: #<Tag:0x00007fa98df08d70>

Hi,

I want to validate checkbox column based on another. Below are the validations:

  1. If column ‘Yes’ unchecked then column ‘YesYes’ should be unchecked
  2. If column ‘Yes’ unchecked and if user is trying to check ‘yesyes’ column then alert should be displayed.

Please check the below code for reference.

https://jsfiddle.net/8qkta5hw/5/

Thanks

Hey @fayejitendra

have you already tried to build an example using our blog on the cell dependencies https://handsontable.com/blog/articles/2016/4/expand-your-app-with-cell-dependencies?
We have a couple of great JSFiddle examples that shows how to use beforeChange / afterChange hooks to set up new content based on other cells.

Yes,. I already created one example but as change event is executing multiple times…i m getting alert messages. Please check the below example

https://jsfiddle.net/8qkta5hw/5/

To exit the loop you need to use src !== 'myFalse' in the IF loop when you execute

hot1.setDataAtCell(row, 3, false, 'myFalse');

The string in the setDataAtCell block the setDataAtCell from being called over and over again

https://jsfiddle.net/a0z72pdh/1/