Hello @Pooja,
when I select row and set checkbox value to ‘on’ It doesnot fire onChange
I’m not quite sure what you mean by this, since the datatable does not have an onChange
event, and the onCheck
event does get triggered.
Considering the desired functionality, the best way to approach your case would be the following: https://snippet.webix.com/0as7r2a5.
Here is the overall principle of how this works:
- As you check a row trigger the
onAfterSelect
event, the same goes for unchecking the row → trigger the onAfterUnSelect
event
- As you select a row trigger the
onCheck
event and change the value of the actual checkbox, the same logic is applied as you unselect the row.
- Ensure that the code does not enter a loop since you are cycling selections and checks.
- In the case you want to make use of the master checkbox some additional logic is required: a custom master checkbox needs to be implemented and the appropriate checks need to be done in the
onCheck
event (check master checkbox as you check every row)