Hi Mykyta,
As stated in your other question, for DataGrid 1 I would use this module.
For DataGrid 2 however, you could apply the following steps:
When opening your DataGrid2, add a 'Dynamic row class'. The expression should look something like this:
if $currentObject/{YourEnumAttribute} = {YourEnumValue} then '{YourClass}' else empty
You can obviously expand this logic as you wish.
Next, add the following lines to whichever Stylesheet you are using in your application:
.{YourClass}{
.td {
background-color: red;
}
}
This code will make the row that matches the ENUM value color red. You can obviously change the color as you seem fit.
All the values between '{ }' should be changed with your own values.
Good luck!
Dynamics classes can work in Datagrid 2:
Add a dynamic cell class (to each column)
If you have some styling like
and add the class "grid-color" to your datagrid2, the result will be: