The refreshColumns() function crashing my app

Hi !

We recently ran into a problem updating our grid version from 18.2.55 to 19.1.58. I tried updating to the latest version and the problem is still present. The refreshColumns() function, when used with the [visible] property on columns is making the application crash. Everything was working fine with the previous version. Here's the error :


Here's the columns that cause the problem. When removing those columns the refreshColumns() is working as intended.

On a button click, I'm updating the importAdresseType variable, then do an API call. On the API call return I call the refreshColumns() function, making the app crash.

I found someone with a similar bug here : https://www.syncfusion.com/forums/164250/gridcomponent-cannot-convert-undefined-or-null-to-object-at-function-keys

Thanks !

Martin Teasdale-Blais

1 Reply 1 reply marked as answer

MS Manivel Sellamuthu Syncfusion Team May 20, 2021 10:51 AM UTC

Hi Martin, 

Greetings from Syncfusion support. 

We have validated the reported issue at our end. We found that while updating the values in the column variable dynamically the angular DOM refreshed before the refreshColumns method is called, which causes the collapse in the column model. 

While analyzing your query we suspect that your requirement is to show/hide columns dynamically in the Grid. So we suggest you to use showColumns/hideColumns methods to achieve your requirement. 
Please refer the below documentation link for more information. 


Regards, 
Manivel 


Marked as answer
Loader.
Up arrow icon