Hi Daniel,
Follow the below steps for your expected result
1)Download javascript snippet
2)Add javascript snippet to the listview
3)Configure the Data source of javascript snippet
4)Enable the options jquery and refresh options and include the javascript code
Javascript Code
if(refresh){
$(this.domNode).empty();
}
$(this.domNode).append(`<p style='background-color:${Color}'>${Name}</p>`);
5)Here is the result
Thanks
Vignesh G
hard one: For me i will build a custom list in react with rendering the box detail inside.
easy one: mendix grid + https://marketplace.mendix.com/link/component/106254
cheers
Hi Daniel,
I find a better way for you to Set Color using database attribute.
First, install the module form app store: css Selector helper widget
Second: use the widgets and set attribute like below image
Finally, You will get the following effect。
So, Try it!!!
If you’re comfortable with a bit of HTML and only need light elements, you could use the Format String widget (https://marketplace.mendix.com/link/component/264) – despite it’s name it is a great way to quickly render HTML elements with custom styling/attributes.
Hi daniel ,
In the container appearance section we have option called dynamic classes which will help you to achieve your cases