Is it possible to load data lazily into a GWT DataGrid, similarly to how the GWT CellList lazily loads data?
I have a GWT DataGrid that can potentially bring back hundreds of rows, but only about 20 rows are displayed at a time. When this occurs, the loading of the grid is quite slow.
I want to use a DataGrid instead of a CellTList because I have multiple columns of data that need to be displayed. And I’ve opted for a DataGrid instead of a CellTable because I want the header columns to be fixed.
Since
DataGriddoesn’t expose it’sScrollPanel, create an inner class that extendsDataGridand provides a reference to theScrollPanel:Initialize the variables needed for this to work:
In the constructor, create the grid:
Then add a ScrollHandler, using the getScrollPanel() reference that was just created: