Setting height of bwu-datagrid to dynamic

29 views Asked by At

If the height of the grid is currently not set, the grid will not be displayed. While this is great for grids with many rows, it creates an issue for me with a grid with a small number of rows, say 4. I have placed three grids in a component and would like the grid height to change with the addition of the rows to each grid. However because of the fixed height limitation, even when the grid has a single row, all grid heights are reserved on the display.

I have tried

<bwu-datagrid id='mygrid' style='width: 200px; height: 30%'><bwu-datagrid>

but it does not work.

Any suggestion please? Thanks

1

There are 1 answers

1
Günter Zöchbauer On BEST ANSWER

I assume what you are looking for is the autoHeight setting in GridOptions. See https://github.com/bwu-dart/bwu_datagrid/blob/master/example/src/e11_autoheight/app_element.dart#L28 for an example

var gridOptions = new GridOptions(
  editable: false,
  enableAddRow: false,
  enableCellNavigation: false,
  autoHeight: true);