首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复Extjs4.2中的表头

如何修复Extjs4.2中的表头
EN

Stack Overflow用户
提问于 2014-02-25 12:08:45
回答 1查看 4.7K关注 0票数 2

我想在我的ExtJs4.2应用程序中修复我的表/网格头,这样在滚动的时候标题总是可见的。我的应用程序中的主网格有一个固定的标头,并按照本文底部的代码实现。不管用我不知道为什么..。我试过用拆分属性,但它也不起作用.:(

这是代码:

代码语言:javascript
复制
function openThePopup() {
var win = new Ext.Window({
    modal : true,
    height : 500,
    width : 900,
    plain : true,
    border : false,
    resizable : false,
    maximizable : false,
    draggable : true,
    closable : true,
    closeAction : 'destroy',
    title : 'Title',
    autoScroll : true,
    buttonAlign : 'center',
    items : [ {
        xtype : 'grid',
        id : 'theGrid',
        store : theStore,
        border : 0,
        layout : 'fit',
        margins : '5 0 0 0',
        split : true,
        columns : [ {
            text : 'Country',
            dataIndex : 'country'
        }, {
            text : 'City',
            dataIndex : 'city'
        }, {
            text : 'ZIP',
            dataIndex : 'zip'
        }, {
            text : 'Street',
            dataIndex : 'street',
            width : 200
        }, {
            text : location,
            dataIndex : 'name',
            width : 200
        } ],
        listeners : {
            itemdblclick : function(t, record, item, index, e, eOpts) {
                ...
            }
        }
    } ],
    buttons : [ {
        onClick : function() {
            ...
        }
    } ]
}).show();
}

我相信任何帮助。

先谢谢你。

向你们所有人致以最良好的祝愿。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-25 12:12:53

您的布局配置不正确。layout: 'fit'应该放在窗口上,布局配置应该从网格中删除。还移除窗口上的autoScroll配置。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22013770

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档