how to change the color of the container data when it is clicked?

0
I need this container to be green in always when i clicked it should change to red color; it contains the value when i clicked the container it should change to red. how to change it dynamic class, style ?
asked
3 answers
2

Hello Tharun,

 

You can set the conditions in the dynamic class and based on that the color will be applied to the container.

 

Step 0: Create a Boolean variable for setting the color and use that in Step 3.

Step 1: Double-click on the container.

Step 2: Go to the Appearance tab, and go to the bottom of the tab, where you will find the Dynamic classes.

Step 3: Now click on Edit, and write your expression (if then ‘class-to-be-applied’ else ‘class-not-to-be-applied’)

 

Hope this answers your question.

answered
0

Are you using a template grid? I can't quite make that out from the screenshot.
If so you should create a custom class for the templategrid which calls upon the “selected” subclass of the templategrid item and set the background to red for it.

 

There’s a learning path (intermediate) that could help

https://academy.mendix.com/link/paths/123/Style-your-App-with-Sass

answered
0

You can add an boolean attribute to the entity, on click set the value, and use it in dynamic class 

answered