Search code examples
gwtextjsgxt

How to remove the header space on Sencha GXT Grid?


The Grid should have a vertical scrollbar, but is hidden. However, there is an space left on the table header.

How to remove the blank space header ?

enter image description here


Solution

  • The solution is to override the GridView to set the space to 0.

    public class CustomGxtGridView<M> extends GridView<M> {
    
        private static int SCROLL_OFFSET = 1;
    
        public CustomGxtGridView(...) {
            super(viewMediator);
            this.scrollOffset = SCROLL_OFFSET;
            this.vbar = false;
            this.setAdjustForHScroll(false);
        }
    
        @Override
        protected int getScrollAdjust() {
            return 0;
        }
    
    }