Hi Dheerej,
I have used “Grid Cell Styler” https://marketplace.mendix.com/link/component/106254 widget.
You should be able to write logic in a nanoflow to change text color or also using a javascript.
Best widget to change text color or row BG color in data grid.
You should be able to see demo here : https://cellstyler-sandbox.mxapps.io/
Hope this helps,
Ashok
Hello DHEEREJ,
To achieve this you’ll use the Dynamic row class feature found in DataGrid2
First create a custom .scss file
.yes
{
color: red;
}
.no
{
color: black;
}
@import "custom-variables";
@import "enum-styling.scss";
Now in Mendix Studio Pro
if getCaption($currentObject/myEnumAttribute) = 'YES'
then 'yes'
else 'no'
*Replace “myEnumAttribute” with your enumeration attribute’s name
*Keep in mind that getCaption() retrieves the enumeration’s Caption and getKey() retrieves the enumeration’s Name
*Make sure you save and apply the changes