Handsontable example
HTML
<div>
<div id="example1" class="hot handsontable htRowHeaders htColumnHeaders"></div>
<button onclick="myFunction()">
Press
</button>
</button>
</div>
CSS
</style>< !-- Ugly Hack due to jsFiddle issue --><script src="https://docs.handsontable.com/pro/1.18.1/bower_components/handsontable-pro/dist/handsontable.full.min.js"></script><link type="text/css" rel="stylesheet" href="https://docs.handsontable.com/pro/1.18.1/bower_components/handsontable-pro/dist/handsontable.full.min.css">
JavaScript
var hot;
document.addEventListener("DOMContentLoaded", function() {
var example1 = document.getElementById('example1');
hot = new Handsontable(example1, {
data: Handsontable.helper.createSpreadsheetData(5, 12),
colHeaders: true,
rowHeaders: true,
contextMenu: true,
hiddenColumns: {
columns: [3, 5, 9],
indicators: true
}
});
});
function myFunction() {
alert("ss0");
var filterPlugin = hot.getPlugin('filters');
filterPlugin.addCondition(0, 'by_value', [
['A1']
]);
filterPlugin.filter();
}