Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issues with scrolling on grids with AutoFitData = VERTICAL

    I'm trying to implement a view that contains various components - including a Tree/ListGrid. The datasets in the grids are relatively small, and I would like to use setAutoFitData(Autofit.VERTICAL) to show the entire grid and handle all vertical scrolling with the outer container. This works just fine unless the grid is wider than the container - forcing a horizontal scrollbar in the grid. When that occurs - the mouse scroll wheel does not scroll the container if the cursor is over the grid; one needs to move the cursor outside the grid to use the scrollwheel. I've put together a test case that shows this behavior - and at least roughly approximates the behavior:
    Code:
    final ListGrid grid = new ListGrid();
            grid.setDataSource(DataSource.get("employees"));
            grid.setUseAllDataSourceFields(true);
            grid.setAutoFitData(Autofit.VERTICAL);
            grid.setOverflow(Overflow.VISIBLE);
            grid.setWidth(600);
            grid.setAutoFetchData(true);
            grid.setAutoFitMaxRecords(200);
            grid.setCellHeight(30);
            
            HStack layout = new HStack();
            layout.setHeight100();
            layout.setWidth100();
            layout.setOverflow(Overflow.AUTO);
            layout.setMembers(grid);
            layout.draw();
    When first opening the module the grid fits in its allotted width and the scrollwheel works fine. If you expand the width of the columns ( either with autofit or manually ) to a width where there is a horizontal scrollbar - then the scroll wheel no longer works to scroll the outer container if the cursor is over the grid. I've tried multiple versions of SmartGWT, on both FF and chrome. I've tried a few things to prevent or workaround this behavior - but so far have been unsuccessful. Is there a way to disable the scroll wheel over the grid? Detect the scroll wheel event and pass to the container? or any other suggestions as to how I might fix or workaround this issue?

    thanks,
    dan
Working...
X