Massive Data Grid in GWT

1.3k views Asked by At

I have looked at custom implementations of data grids, but none had the resources I need, they are: live update of rows (the last entries are going to be on top of the table, that is LIFO), adding Widgets like CheckBox, Button, ComboBox... and that uses a Scroll instead of a Pager (the table is going to hold a lot of entries at a time; in fact, this last requirement is just a preference, but not so important).

So I have two questions, if there is an already implemented solution (I already know implementations like LiveGrid from SmartGwt, or Grid from Vaadin, GXT... etc, what I want is an implementation which mainly makes use of GWT user library, because I wanna customize its CSS without trouble), and if I try to implement this, what would be better to use, CellTable or Grid?

1

There are 1 answers

0
Hilbrand Bouwkamp On

If you:

  • Don't need a header.
  • Only add a small number of rows each time at the top of your table.
  • Don't need to redraw or update existing data in the table with new values to often.

Then go with Grid.

Grid has no build in header support as with CellTable. CellTable is designed for large datasets, but to specifically render the whole data set and/or update the table with new data. Incremental adding rows, especially at the top is fast in Grid, because the way elements are added to the DOM in JavaScript.

If your table becomes very large, Grid is will take more memory, because the overhead is larger compared to CellTable. With Grid you put Widgets in it, while CellTable uses Cell's which is basically plain HTML put directly into the CellTable.