Widget in a grid

0
Question: Is it possible to place a widget in a Mendix data grid ? Scenario: I have a widget that displays as a blank, a cross or a tick, based on the value of an entity attribute. I want to have this widget in a datagrid of these entities. The widget must be clickable to allow the user to alter the attribute value. Alternatives: If there is another Mendix or community widget that can display a grid format and allows insertion of other widgets that would be of interest. Thanks in advance. J
asked
2 answers
1

Did you try the templategrid feature Mendix offers? In the templategrid you could create three buttons (blank, cross, tick) managed by conditional visiblity based on that attribute. Clicking on the button changes the attribute, hence triggering showing and hiding of those buttons again.

If the widget actually has even more to offer than just ticking and changing the attribute value, you could also add a widget in the templategrid as well. But I would go for three buttons based on your scenario.

answered
1

In a datagrid, you can display an enumeration attribute as an image (each value of an enumeration can have an image associated with it). So you could use that approach in a datagrid. Using this approach, you could set up a default action button in the control bar that toggles through the values of the enumeration.

You could use a ListView or TemplateGrid to build this. In either one, you can place a wide variety of widgets. With a bit of styling work, either one can look very similar to a DataGrid. In either one, you can have a clickable widget to enable changing the value of an attribute.

Hope that helps.

answered