Grid Pagination
Custom Vaadin 14+ Grid component with pagination feature enabled
Adding pagination feature to the Vaadin 14+ Grid component.
Component originally created by Klaudeta Mertiku, now in maintenance mode by Team Parttio.
Sample code
PaginatedGrid<Address> grid = new PaginatedGrid<>(); grid.addColumn(Address::getId).setHeader("ID"); grid.addColumn(Address::getCountry).setHeader("Country").setSortable(true); grid.addColumn(Address::getState).setHeader("State").setSortable(true); grid.addColumn(Address::getName).setHeader("Name").setSortable(true); grid.addColumn(Address::getAddress).setHeader("Address").setSortable(true); grid.setItems(dataProvider.getItems()); // Sets the max number of items to be rendered on the grid for each page grid.setPageSize(16); // Sets how many pages should be visible on the pagination before and/or after the current selected page grid.setPaginatorSize(5);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Support for Vaadin 24
- Released
- 2023-04-17
- Maturity
- EXPERIMENTAL
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24
- Vaadin 23+ in 3.0.0
- Vaadin 14 in 2.0.10
- Vaadin 14+ in 2.0.9
- Vaadin 13 in 1.0.1
- Vaadin 12 in 1.0.1
- Vaadin 11+ in 1.0.0
- Vaadin 11 in 1.0.1
- Vaadin 10+ in 1.0.0
- Vaadin 10 in 1.0.1
- Browser
- Browser Independent