Your conclusion is correct, you can only add a class, not a style. This is compliant with Mendix’ preference of using classes over inline styling. What you can do, is first add a class to your project’s styling in _custom.scss, say ‘myclass’, and add
{background-color: powderblue}
to it. Then enter ‘myclass’ as value for property ‘Class to apply’. If you want a different background-color for each different value of rowObj,integer, you will have to set one rule per value.
Ah, this is basicly what Mohammed lso said
Hi Felix,
You can add one or more new class in your stylesheet and use that in the widget.
Hope this helps!
So I just added a new class in \theme\styles\css\custom.scss file but it did not work… the cell is not colored.
Here is what I did:
and added
.heatmap-first {background-color: powderblue}
saved and reopened the project, set class to apply on heatmap-first but it did not work.
Any idea what’s wrong?
Many thanks :)
Thanks for the valuable hint @Eric :)
I created the new class and it works fine for regular widgets now.
But it still does not for the Grid Cell Styler…
So there is definitaly no problem with the new class since it is working for other widgets but I am not able to make it work with the Grid Cell Styler. It seems like only the basic classes work for it.
Any additional ideas what I could try next?