extjs 5网格的滚动条在边界布局面板中不起作用 [英] extjs 5 grid's scrollbar does not work in border layout panel

查看:230
本文介绍了extjs 5网格的滚动条在边界布局面板中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在边界布局面板中,即使网格的存储时间足以使网格溢出,网格的滚动条也无法正常工作!



如果我的网格在没有边框的布局面板中,滚动条是可以的,但是当我把网格放在边框布局面板中时,要么没有滚动条,要么是无效的滚动条!

  {
//我想要的是让这个网格滚动!滚动条嵌套在边框布局面板中。
xtype:'grid',
title:'west bottom grid(我要求你的滚动条!)',
列:[{
text:'header',
dataIndex:'header'
}],
store:Ext.create('MyApp.OverflowStore'),//这个存储足够长以使网格溢出
autoScroll:真正的
}

完整的代码:参见sencha fiddle: https://fiddle.sencha.com/#fiddle/ffv



如果有人可以帮助给网格一个正确的滚动条?

容器以及确保像网格这样的容器具有弹性值以便正确分配空间。
在这里查看更正的小提琴


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 ?

解决方案

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

这篇关于extjs 5网格的滚动条在边界布局面板中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆