GridBuilder
@Js
class GridBuilder : Obj
GridBuilder is used to build up an immutable Grid. To use first define your cols via addCol and then add the rows via addRow:
gb := GridBuilder()
gb.addCol("a").addCol("b")
gb.addRow(["a-0", "b-0"])
gb.addRow(["a-1", "b-1"])
grid := gb.toGrid
Add dict as a new row to the grid
Construct to finalized grid
Add all the rows of given grid as rows to our grid
Add list of column names to the grid
Number of rows added to the grid
Add column to the grid
Convience for adding a list of addDictRow
Set the grid meta (overwrites any current meta) The meta parameter can be any Etc.makeDict value
Add list of cells as a new row to the grid
Number of columns added to the grid
This addCol(Str name, Obj? meta)
Add column to the grid. The meta parameter can be any Etc.makeDict value.
This addColNames(Str[] names)
Add list of column names to the grid.
This addDictRow(Dict? row)
Add dict as a new row to the grid. All the dict tags must have been defined as columns.
This addDictRows(Dict?[] rows)
Convience for adding a list of addDictRow.
This addGridRows(Grid grid)
Add all the rows of given grid as rows to our grid
This addRow(Obj?[] cells)
Add list of cells as a new row to the grid. The cell list size must match the number of columns.
Int numCols()
Number of columns added to the grid
Int numRows()
Number of rows added to the grid
This setMeta(Obj? meta)
Set the grid meta (overwrites any current meta) The meta parameter can be any Etc.makeDict value.
Grid toGrid()
Construct to finalized grid