ExtJS 3.3中的水平滚动网格 [英] Horizontally Scrollable Grid in ExtJS 3.3

查看:118
本文介绍了ExtJS 3.3中的水平滚动网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ExtJS的新手,很难在600px宽的Ext.grid.EditorGridPanel中容纳大量的列(参见下面的示例)。将所有网格列一起滚动或类似于第二个此示例中显示的网格(Ext 4)将执行此操作。

I'm new to ExtJS and am having hard time accommodating a large number of columns in a 600px wide Ext.grid.EditorGridPanel (see example below). Scrolling all grid columns together or something similar to the second grid shown in this example (Ext 4) would do it.

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中处理大量网格列的机制,类似于处理标签

I've tried to set autoScroll = true at several different levels without any luck. Is there a mechanism to handle tons of grid columns in ExtJS 3.3, similar to the one provided for handling tabs?

推荐答案

我已经通过将Ext.grid.EditorGridPanel与下面的面板进行包装来解决这个问题,并调整其宽度以适应所有列很好

I've solved this issue by wrapping the Ext.grid.EditorGridPanel with the panel below and adjusting its width to accommodate all columns nicely.

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

这篇关于ExtJS 3.3中的水平滚动网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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