`
wangju19870301
  • 浏览: 36432 次
  • 性别: Icon_minigender_1
  • 来自: 江苏
社区版块
存档分类
最新评论

ExtJS GridPanel表头错位和自适应宽度的解决方法

阅读更多

1ExtJS 2.2中,Ext.grid.GridPanelIE中表头的图标会发生错位,如图所示:

但是在Firefox中显示是正常的。

解决方法为:在所用到的css文件中添加代码,

.ext-ie6 .x-menu-item-icon,.ext-ie7 .x-menu-item-icon,.ext-ie8 .x-menu-item-icon {

    left: -24px;

}

 

2Ext.grid.GridPanelIE中的宽度太大,而且不能自适应宽度,解决方法见如下的一段代码:

var grid = new Ext.grid.GridPanel({

    renderTo : "content",

    autoHeight : true,

    frame : true,

    bodyStyle : "width:100%",

    viewConfig : {

       forceFit : true

    }

});

关键是设置bodyStyle的值为width:100%

  • 大小: 13.9 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics