Required result: A Grid Column displays an icon in the given row.
{1..10}
.Closure
and define its value as a closure that returns the icon, for example: { i:Integer -> new FontAwesome5("ambulance").toHtml(); }
You can modify the closure so the icon changes depending on circumstances:
//i is the row object: we set the data source to a collection //of Integers; therefore, it is an Integer: { i:Integer -> def FontAwesome5 icon; if i%2==0 then icon := new FontAwesome5("sticky-note"); else icon := new FontAwesome5("ambulance"); end; icon.toHtml(); }