How to Checkbox within a template grid

0
This post was created 7 years ago, was wondering if anyone knows of a workaround or hack?  https://community.mendix.com/link/questions/2465 I know that there is a Simple Checkbox Set Selector but I’m looking for a solution that flags a boolean of the entity viewed within the template grid. Currently, I’m using a Glyphicon 'check' image on a microflow button with some custom CSS to hide the borders of the button. Hoping for something cleaner.   
asked
3 answers
0

Maybe I don't understand the problem correctly, but a checkbox can be displays as a checkbox in a template grid. As long as the '’read-only style'’ is set to 'Control’, the checkbox will be displayed as such, and not as yes/no.

answered
0

What I’m effectively trying to do is select multiple rows via indicating the selection of a row through a checkbox. The checkbox represents a boolean which indicates it’s selection.

 

“Read-only” checkbox displays correctly (if I update the boolean state via a MF then the checkbox changes appropriately), “Based on data view” also displays correctly but prevents me from clicking the checkbox.

answered
0

I understand that clicking the row fires a microflow that changes the value of the boolean.

In that case you could use use two images instead of the checkbox widget. One image of a checked checkbox and one image of an unchecked checkbox.

Then set the visibility of the checked checkbox image on visible when the boolean is true.

And set the visibility of the unchecked checkbox image on visible when the boolean is false.

While using the app when clicking a row in your template grid, the boolean value will change. The visible image will then change accordingly.

EDIT:

Or if you specifically want to select a row by clicking the checkbox, you can put the on change microflow as on-click event on both images.

answered