Search code examples
gwtgxt

GXT 3 grid scrolling issue


I'm using GXT 3.0.0b.

I have a Grid on ContentPanel. When I set ContentPanel width explicitly there is no problem with scrolling. But when I put grid in VerticalLayoutContainer the vertical scrollbar of the grid disappears and scrolling is possible only with mouse wheel.

Does anybody know how to solve this problem?


Solution

  • Finally I've managed to solved this problem. The answer was rather elegant: when I added grid to VerticalLayoutContainer I should specify VerticalLayoutData parameter.

    Example:

    verticalLayoutContainer.add(grid, new VerticalLayoutData(1, 1));
    

    You can also pass fraction, for example, 0.6 will set width (or height) to 60%. If you pass -1 then component will have it's own default pixel size.