On This Page
A grid is the equivalent for the html table, but with steroids.
- Fluent
- Declarative
Grid.builder()
.content(List.of(
GridColumn.builder().id("id").label("Id").build(),
GridColumn.builder().id("name").label("Name").build(),
GridColumn.builder().id("age").label("Age").build()
))
.page(new Page<>(10, 1, 3, List.of(
Map.of("id", "1", "name", "Mateu", "age", "17"),
Map.of("id", "2", "name", "Antònia", "age", "49"),
Map.of("id", "3", "name", "Miguel", "age", "56")
)))
.build()
TBD.
Available properties
This is the list of available properties for a crud:
| Property | Description | Notes |
|---|---|---|
| id | id for this component | |
| cssClasses | list of css classes | content of the css attribute |
| style | inline style attributes | content of the style attribute |
| fullWidth | shortcut to set width:100% | true/false |
| content | columns | |
| page | the items |
You can see a full explanation of those properties at https://vaadin.com/docs/latest/components/grid