I used the code you sent me, the only thing I added is that .handsontable class in CSS. If that still doesn’t work for you, please modify my demo to your exact settings so I’ll be able to investigate it further.
I am using this to create handsonTable instance only once when the data is received from API. Once the handsontable instance is created then if new data is fetched from the API then I’m just loading new data to the instance, showing the block of code below:
Actually the project is pretty much big. Can you please create a Demo with exact my config code, by creating everything from TS file ?
That would be much helpful.
In above image, for tag “td” “class=odd” is getting applied but td.odd style is not been added in styles section automatically. (I have added td.odd style manually in styles and then the table striped rows appeared).
@adrian.szymanski way with defining .handsontable .odd as the CSS className and using !important for the background-color is the recommended way.
If that does not work in your project you should check the computed part of the CSS section in the Chrome webtools. Maybe there is some CSS framework/library that overwrites your settings.
Hi @aleksandra_budnik, I also tried .handsontable .odd as CSS className and using with !important for the background-color.
In that case, there was no CSS class found in CSS section in Chrome webtools.
So, can you let me know why it is not getting applied in CSS section or is there any other way to add CSS class?
It is added in the JSfiddle above https://jsfiddle.net/okx3dsug/ so without the ability to replicate the exact environmental details as you have we won’t be able to help much.
If you did apparently some other factors differ. If that’s not the browser, system, and code. Maybe it’s script execution order, library interference, or environmental settings.
I’m closing this issue as there are no further updates. Nevertheless, I hope that it means that the issue is solved. If it’s not @sam please feel free to reopen the topic or create a new one.