10.8. Building a DataGrid

A DataGrid is essentially a CellTable but one where any header and footer are fixed in position and data in the widget scrolls between them. You can see this situation in figure 10.20.

Figure 10.20. The photos shown in a DataGrid

The other point to note about a DataGrid is that it needs to be placed in a layout panel of some form to ensure it can resize as necessary (we used a simple ResizeLayoutPanel in the example code). Beyond that, you can consider a DataGrid the same as a CellTable.

One thing that you can do with CellTable and DataGrid is provide alternative builders—this is useful if you wish to have, for example, ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.