I want to add some style classes to a handsontable cell header (colHeaders). I am using a custom renderer to do this on the table cells however i can't find out how to do this to the cell header.
I have tried to use JQuery to add a class to the appropriate colHeader in the custom renderer however this doesn't seem to work. Looking at the style of the th in chrome inspector shows an empty style attribute. Does handsontable have another way to add a style to a class? I need to do this to selected column headers and not all of them.
var container = document.getElementById('spreadsheet');
hot = new Handsontable(container, {
data: null,
startCols: columns.length,
colHeaders: columns,
minSpareRows: 100,
rowHeaders: true,
contextMenu: false,
columnSorting: true,
stretchH: 'all',
cells: function (row, col, prop) {
var cellProperties = {};
cellProperties.renderer = hiddenCellRenderer;
return cellProperties;
}
});
function hiddenCellRenderer(instance, td, row, col, prop, value, cell) {
var modeColumns = getCurrentModeColumns();
//Check for a hidden field match, if so add the CSS value
if(modeColumns[col].hidden == '1') {
$(td).addClass("hidden-cell");
$(td).closest('table').find('th').eq(col).addClass("hidden-cell");
}
return;
}