【问题标题】:Horizontally Scrollable Grid in ExtJS 3.3ExtJS 3.3 中的水平滚动网格
【发布时间】:2013-02-25 17:46:21
【问题描述】:

我是 ExtJS 的新手,很难在 600 像素宽的 Ext.grid.EditorGridPanel 中容纳大量列(参见下面的示例)。将所有网格列一起滚动或类似the second grid shown in this example (Ext 4) 的东西就可以了。

var grid = new Ext.grid.EditorGridPanel(
    this.getGridConfig('', ['a', 'b', 'c', '...', 'x', 'y', 'z'], [
        {
            dataIndex: 'a',
            header: 'A',
            editor: new Ext.form.TextField({width: 200, allowEmpty: false})
        },
        {
            dataIndex: 'b',
            header: 'B',
            editor: bCombo,
        } /* many more column definitions here... */],
        definitions,
        'disabled'
    )
);

我尝试将autoScroll = true 设置在几个不同的级别,但没有任何运气。 ExtJS 3.3 中是否有一种机制可以处理大量网格列,类似于为handling tabs 提供的机制?

【问题讨论】:

    标签: extjs extjs3


    【解决方案1】:

    我已经解决了这个问题,方法是用下面的面板包裹 Ext.grid.EditorGridPanel 并调整它的宽度以很好地适应所有列。

    var gridPanel = new Ext.Panel({
        width: '100%',
        height: '100%',
        renderTo: Ext.getBody(),
        autoScroll: true
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-06
      • 2016-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-28
      相关资源
      最近更新 更多