With https://github.com/consultingwerk/ListsAndEnumSamples/blob/master/Consultingwerk/foreach.i

Boolean 1 would be the name of the grid cell that determines if you'd like to expand the row or now.

ultraGrid1 is the Grid reference.

You may need a few USING statements.

 

1
2
3
4
5
6
7
8
{Consultingwerk/foreach.i UltraGridRow oRow in ultraGrid1:Rows}
 
  IF UNBOX (oRow:Cells["Boolean 1"]:Value) = FALSE THEN
     oRow:Expanded = TRUE .
  ELSE
     oRow:Expenaded = FALSE .
 
END.