Search code examples
gwtdatagridcelltable

Difference between Datagrid and CellTable in GWT


What is the difference between the Datagrid and Celltable?

I know that following major differences

  1. Datagrid provides RequiresResize.onResize() functionality while celltable does not give this
  2. Datagrid headers are fixed and do not move while scrolling the content. But i want to know is this much difference is enough that they made a whole new widget.

Solution

  • Yes, those and other differences make the need of a new widget.

    DataGrid is thought to be included in a ProvidesResize hierarchy (Layout panels), and it explicitly requires to set a fixed width when you dont put it in a ProvidesResize widget.

    As you can see, in GWT, for certain things, there are two implementations of the same widget depending on the app layout (Basic or Layout panels).