我想在我的ExtJs4.2应用程序中修复我的表/网格头,这样在滚动的时候标题总是可见的。我的应用程序中的主网格有一个固定的标头,并按照本文底部的代码实现。不管用我不知道为什么..。我试过用拆分属性,但它也不起作用.:(
这是代码:
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();
}我相信任何帮助。
先谢谢你。
向你们所有人致以最良好的祝愿。
发布于 2014-02-25 12:12:53
您的布局配置不正确。layout: 'fit'应该放在窗口上,布局配置应该从网格中删除。还移除窗口上的autoScroll配置。
https://stackoverflow.com/questions/22013770
复制相似问题