用户登录
用户注册

分享至

Extjs gridpanel 出现横向滚动条问题的解决方法

  • 作者: usuussggsh
  • 来源: 51数据库
  • 2021-08-01
复制代码 代码如下:

viewconfig : {
layout : function() {
if (!this.mainbody) {
return; // not rendered
}
var g = this.grid;
var c = g.getgridel();
var csize = c.getsize(true);
var vw = csize.width;
if (!g.hideheaders && (vw < 20 || csize.height < 20)) { // display:
// none?
return;
}
if (g.autoheight) {
if (this.innerhd) {
this.innerhd.style.width = (vw) + 'px';
}
} else {
this.el.setsize(csize.width, csize.height);
var hdheight = this.mainhd.getheight();
var vh = csize.height - (hdheight);
this.scroller.setsize(vw, vh);
if (this.innerhd) {
this.innerhd.style.width = (vw) + 'px';
}
}
if (this.forcefit) {
if (this.lastviewwidth != vw) {
this.fitcolumns(false, false);
this.lastviewwidth = vw;
}
} else {
this.autoexpand();
this.syncheaderscroll();
}
this.onlayout(vw, vh);
}
}
软件
前端设计
程序设计
Java相关