For those still struggling with CellTable
(auto-height, pager always under the last line) and DataGrid
(fixed header but height should be fixed and the pager will stay at the same place even if you got one line of data).
Don't forget they extend the same class : AbstractCellTable
So you can adapt your code easily (Note TableType is just an enum I created):
if (tableType == TableType.CELLTABLE) {
// CellTable
CustomTableWidgetCellTableResource resource = GWT.create(CustomTableWidgetCellTableResource.class);
table = new CellTable<T>(10, resource);
} else {
// DataGrid
CustomTableWidgetDataGridResource resource = GWT.create(CustomTableWidgetDataGridResource.class);
table = new DataGrid<T>(10, resource);
table.setHeight("470px"); // Default height
}