Highlight text in different color - Dynamic data grid
I would like to highlight the list of elements populated in data grid dynamically based on some conditions which should not be visible in UI. For example: displaying data grid with person name and position. I would like highlight the higher hierarchy person alone in green (Manager & above) without displaying their designations in UI. Technically there won't be any HTML reference element to filter & highlight those names. Please share your ideas to solve this case?
I see that you are using the 5.21 modeler. You can try the datagrid extension widget. It supports styling rows in a datagrid based on a value.
I see two options. Since the first one with the HTML snippet seems feasible and a bit better maintainable, I would go for the first option. The custom widget would have the benefit that you do not have to create an extra attribute, but you would possibly need extra database calls from the widget, to check which row to highlight.
Extra technical attribute + HTML snippet
Add an extra technical attribute in the entity, something like _highlighted which is a boolean;
Populate the value of this attribute by Mendix microflow logic;
Populate the datagrid with that entity, but make sure the technical attribute is not shown (zero width);
Add a HTML snippet widget below the datagrid;