`

解决extjs 3 chrome上grid 合并表头 cm错位

 
阅读更多

问题: extjs 合并表头 ,列有错位情况



 解决方法:

//解决extjs 谷歌浏览器grid 里面cm错位
	Ext.grid.ColumnModel.override({
		getTotalWidth: function(includeHidden) {
			var off = 0;
//			if(!Ext.isDefined(Ext.isChrome19)){
//				Ext.isChrome19 = /\bchrome\/19\b/.test(navigator.userAgent.toLowerCase());
//				};
			if (Ext.isChrome){
				off = 2;
			};
			if (!this.totalWidth) {
				this.totalWidth = 0;
				for (var i = 0, len = this.config.length; i < len; i++) {
					if (includeHidden || !this.isHidden(i)) {
						this.totalWidth += this.getColumnWidth(i)+off;
					};
				};
			};
			return this.totalWidth;
			}
		});

 修正后:

 

资料:http://www.sencha.com/forum/archive/index.php/t-198124.html?s=782e3297b3794980e855431bf90e6172

 

  • 大小: 20.9 KB
  • 大小: 37.8 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics