外部网格分页工具栏不显示在IE上

Ext grid PagingToolbar does not show on IE

本文关键字:IE 显示 网格 分页 工具栏 外部      更新时间:2023-09-26

我有如下的Viewport。CCD_ 1具有具有CCD_ 2的网格。它在IE中不显示,在FF中显示很少。如果我没有北部区域,它可以正常工作。原因是什么?

Ext.create('Ext.Viewport', {
    layout: 'border',
    border : 0,
    items: [
         {
            region: 'north',
            html : 'Some html'
         },
            { region: 'center',
            layout:'fit',
            split : true,
            items : [panel1, panel2]
         }
    ]
    });

下面是一个类似的例子:http://jsfiddle.net/edgMV/20/按钮没有显示。

我在看你的Fiddle,但有几点不对劲。

  • CSS看起来像一个不完整的Neptune样式表
  • 通过在您的区域面板中执行以下操作:items: resultsPanel,您正在该面板内创建一个新面板
  • 您在元素上设置了不正确的配置,我的建议是查看ExtJS文档,它列出了所有有效的配置选项
  • 您可能想看看MVC体系结构教程

现在对于布局,我不知道你到底想要什么,但这可能很接近:http://jsfiddle.net/laurenzonneveld/kVUEU/4/

var navigate = function (panel, direction) {
    var layout = panel.getLayout();
    layout[direction]();
    Ext.getCmp('move-prev').setDisabled(!layout.getPrev());
    Ext.getCmp('move-next').setDisabled(!layout.getNext());
};
Ext.define('App.view.RequestPanel', {
    extend: 'Ext.panel.Panel',
    alias: 'widget.requestpanel',
    title: 'Request Panel',
    items: [{
        html: 'Sample Result'
    }],
    bbar: [{
        xtype: 'button',
        text: 'Search'
    }, {
        xtype: 'button',
        text: 'Reset'
    }]
});
Ext.define('App.view.ResultPanel', {
    extend: 'Ext.panel.Panel',
    alias: 'widget.resultpanel',
    title: 'Result Panel',
    layout: 'card',
    items: [{
        xtype: 'panel', // Standard panel, but this could be another super complex panel
        html: 'Sample Result 1'
    }, {
        // Defaults to xtype: 'panel', if no xtype is specified
        html: 'Sample Result 2'
    }, {
        // Defaults to xtype: 'panel', if no xtype is specified
        html: 'Sample Result 3'
    }, {
        // Defaults to xtype: 'panel', if no xtype is specified
        html: 'Sample Result 4'
    }],
    bbar: [{
        xtype: 'button',
        text: 'Previous',
        handler: function (btn) {
            navigate(btn.up('panel'), 'prev');
        }
    }, {
        xtype: 'button',
        text: 'Next',
        handler: function (btn) {
            navigate(btn.up('panel'), 'next');
        }
    }]
});
Ext.create('Ext.container.Viewport', {
    layout: 'border',
    items: [{
        region: 'north',
        html: '<h1 class="x-panel-header">Sencha</h1>',
        border: false
    }, {
        xtype: 'requestpanel', // Your super complex panel
        region: 'center', // Context specific properties for the panel
        layout: 'fit', // Context specific properties for the panel
        flex: 1 // Context specific properties for the panel
    }, {
        region: 'south', // Your super complex panel
        xtype: 'resultpanel', // Context specific properties for the panel
        flex: 1, // Context specific properties for the panel
        collapsible: true, // Context specific properties for the panel
        split: true
    }]
});

编辑:更新Fiddle和代码示例以使用Ext.define