Data grid cell coloring based on data


#1

Hello, i’m trying to color specific grid cells where the coloring is defined in the incoming data received from backend. Is there a built in way to make this work or perhaps a workaround?
The data would be something like this:
[
“col1” : { “css” : “red”, “value” : “entry1”},
“col2” : “entry2”
]


#2

Unfortunaetly rthere is no possinbility to assign the custom color to the cell directly in the dataset.
You may change the cell styles using the API:
https://docs.dhtmlx.com/suite/grid__customization.html#stylingcells
or you may try to use the cell marks
https://docs.dhtmlx.com/suite/grid__customization.html#addingcustommarkstocells
checking the needed style (class) defined in your dataset.
Here is the example
https://snippet.dhtmlx.com/tlzsocfa