extjs gridpanel无法滚动

时间:2018-10-20 16:29:32

标签: extjs scrollbar gridpanel

工具箱-经典。主题-经典。

Ext.define('Cabinet.view.main.Main', {
    extend: 'Ext.container.Viewport',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    items: [
        {
            xtype: 'toolbar',
        },
        {
            xtype: 'maincontainerwrap',
            id: 'main-view-detail-wrap',
            reference: 'mainContainerWrap',
            flex: 1,
            items: [
                {
                    xtype: 'container',
                    width:250,
                    reference: 'navTreePanel',
                    itemId: 'navTreePanel',
                    style: 'overflow:hidden', 
                    layout: 'absolute',
                    items: [
                    {
                        x: 0,
                        y: 0,
                        anchor: '+17 0',
                        xtype: 'treelist',
                        reference: 'navigationTreeList',
                        itemId: 'navigationTreeList',
                        ui: 'navigation',
                        store: 'NavigationTree',
                        width: 190,
                        style: {
                            'overflow-y':'scroll'
                        },
                        expanderFirst: false,
                        expanderOnly: false,
                        listeners: {
                            selectionchange: 'onNavigationTreeSelectionChange',
                            itemclick: 'onNavigationTreeItemClick'
                        }
                    }]
                },
                {
                    xtype: 'container',
                    flex: 1,
                    reference: 'mainCardPanel',
                    cls: 'sencha-dash-right-main-container',
                    itemId: 'contentPanel',
//                  scrollable: 'y',  
    //              layoutConfig:{layoutOnCardChange:true},
                    layout: {
                        type: 'card',
                        anchor: '100%'
                    }
                }
                ] 
            } 
    ]
...        

像这样在mainCardPanel中动态添加视图:

Ext.define('Cabinet.view.charts.aS', {
    extend: 'Ext.container.Container',
    xtype: 'aS',
    layout: 'fit', 
    items: [
        {
            xtype: 'panel',
            cls: 'faq-left-sidebar shadow',
            margin: 10,
            header: false,
            layout: 'fit', 
            ui: 'light',
            items: [
        {
                xtype:'gridpanel',
                ...... 
        }
         }
     ]

});

最初,此代码可与theme-triton一起使用,并且一切正常。

下一步,如果我将主题更改为theme-classic

,此gridpanel滚动条之后没有出现,但一切正常。我可以在网格面板中滚动行,但没有滚动条。

如何解决? 谢谢

0 个答案:

没有答案