My code is like below:
$( multiTableArray ).each(function( i , v) {
var $container = $("#hot_"+i);
$container.handsontable({
data:myData,
columns: colls,
stretchH: 'all',
autoWrapRow: true,
contextMenu: ['row_above', 'row_below', 'remove_row'],
colHeaders: colHeaders,
colHeaders: function (col) {
var colHeaderName = colHeaders[col];
switch (colHeaderName) {
case "addLine":
var txt = "<input type='checkbox' data='"+i+"'class='checker' ";
txt += isChecked(myData) ? 'checked="checked"' : '';
txt += ">";
return txt;
default:
return colHeaders[col];
}
},
});
$container.on('mouseup', 'input.checker', function (event) {
var current = !$('#containerID input.checker').is(':checked');
var id = $(this).attr('data');
$(myData).each(function( myDataIndex , myDataVal) {
myDataVal.addLine = current;
myData[myDataIndex] = myDataVal;
})
$container.handsontable('render');
});
})
This code is solving my problem to checked/unchecked all checkboxes on cclicking checkbox inside header of a particular table. But if one table have all checkbox checked then header checkbox of rest other tables does not work untill i uncheck the previously checked one.
Please suggest if i am doing it wrong way, also please help how resolving the issue.