adding condition on datagrid column

0
hello mendix developers, how can i add a condition to a specific datagrid columns! suppose i want to add a condition if quantity == 0 then i want to display a out of stock message in the quantity column how can i do this!!    any help would be highly appreciated.
asked
1 answers
1

You cannot change the value displayed in a column conditionally with datagrid.  However, you can do this in datagrid2 or a listview.  Use a Text widget and make the displayed value using an expression.  See here for more information:  https://docs.mendix.com/studio/page-editor-widgets-text/#content 

 

In datagrid, you could use the Grid Cell Styler widget to turn the 0 red or bold or create some other visual cue for the user.  Link to the widget here https://marketplace.mendix.com/link/component/106254

 

Hope that helps.

answered