adding condition on datagrid column

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.
1 answers

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: 


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


Hope that helps.