extjs 5 grid's scrollbar does not work in border layout panel

眉间皱痕 提交于 2019-12-24 06:26:09

问题


in border layout panel , the grid's scroll-bar doesn't work correctly even though the store of grid is long enough to make the grid overflow!

if my grid is in none border layout panel , the scroll-bar is OK, but when i put the grid in the border layout panel , either there is no scroll-bar ,either there is a invalid scroll-bar!

{
        // what i want is  to make this grid to scroll ! the scroll-bar is nested in a border layout panel.
        xtype: 'grid',
        title: 'west bottom grid(I am begging for your scrollbar !)',
        columns: [{
            text: 'header',
            dataIndex: 'header'
        }],
        store: Ext.create('MyApp.OverflowStore'), //this store is long enough to make the grid overflow
        autoScroll: true
    }

full code : see sencha fiddle : https://fiddle.sencha.com/#fiddle/ffv

if anyone could help to give the grid a correct scrollbar ?


回答1:


You should make sure you set up layouts for your components' containers as well as to make sure that containers like the grid have a flex value to have the space properly allocated. See corrected fiddle here



来源:https://stackoverflow.com/questions/27616210/extjs-5-grids-scrollbar-does-not-work-in-border-layout-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!