Handsontable example
by handsoncode
HTML
<script src="https://docs.handsontable.com/bower_components/handsontable/dist/handsontable.full.min.js"></script>
<link rel="stylesheet" href="https://docs.handsontable.com/bower_components/handsontable/dist/handsontable.full.min.css">
<div id="example1"></div>
CSS
body {
padding: 0;
margin: 0;
background: #fff;
}
JavaScript
const example = document.getElementById('example1');
const hot = new Handsontable(example, {
data: [
['Value', 'Criteria', 'Comment'],
[null, null, null]
],
rowHeaders: true,
colHeaders: true,
colWidths: 232,
licenseKey: 'non-commercial-and-evaluation',
cells: function(row, col) {
const cellProperties = {};
if (row === 0) {
if (col === 0) {
//column A - named 'Value'
} else if (col === 1) {
//column B - named 'Criteria'
} else if (col === 2) {
//column C - named 'Comment'
}
}
return cellProperties
}
});