Access global variable inside the renderer function in Angular App

Tags: #<Tag:0x00007f24a2662290>


I am working on Angular 12 with Handsontable 12.

I am trying to add a list of objects inside renderer function as below(inside .ts file):

renderer(instance:any, td:any, row:any, col:any, prop:any, value:any, cellProperties:any)
for(var obj of this.resultList){
if( && obj.flag){ = ‘bold’; = ‘red’;
td.innerText = value;
return td;

It is giving error in console as :
ERROR TypeError: Cannot read properties of undefined (reading ‘resultList’)

However, I have created “resultList” as global variable which holds Handsontable data.

The logic I am trying to add here is:
If the value matches with the Name in the list and flag is True then set Cell text-color to Red and fontWeight to bold

This I have added in HTML file.

Can anyone help with how to access Global Variable inside the renderer function ?


Hi @sam

We are investigating your issue, but we need a bit more time. We’ll get back to you after the weekend.