following code is my code.
let hot = new Handsontable(SheetGrid, {
licenseKey: 'non-commercial-and-evaluation',
startRows: 0,
startCols: 22,
manualColumnResize: true,
columns: columnSettings,
});
let columnSettings = [
{ data: 'id', className: 'custom_cell' },
{ data: 'prd_uid' },
{ data: 'prd_mid', renderer: 'validationRenderer' },
{ data: 'prdin_name', renderer: 'validationRenderer' },
{ data: 'prdin_url', renderer: 'validationRenderer' },
{ data: 'prdin_id', renderer: 'validationRenderer' },
];
Handsontable.renderers.registerRenderer('validationRenderer', (hotInstance, td, row, column, prop, value, cellProperties) => {
Handsontable.renderers.getRenderer('text')(hotInstance, td, row, column, prop, value, cellProperties);
let column_vals = hot.getDataAtProp(prop);
if (column_vals.filter(x => x === value && x != '').length > 1) {
cellProperties.className = "error_cell";
}
//style
.error_cell {
background: linear-gradient(90deg, #3e3e3e 35%, #ff3738);
color: #fff;
}
and, I have a test video.
https://drive.google.com/file/d/1L4hDKCWc9M8Nsb6sLrwpQKFZT8CaT1ep/view?usp=sharing