Ext.override(Ext.grid.GridView, {
renderBody : function() {
var markup = this.renderRows();
if (markup == "")
markup = "<div style=‘width:" + this.getTotalWidth()
+ "‘> </div>";
return this.templates.body.apply({
rows : markup
});
}
});
Ext.override(Ext.grid.GroupingView, {
updateGroupWidths : function() {
if (!this.enableGrouping || !this.hasRows()) {
return;
}
var tw = Math.max(this.cm.getTotalWidth(),
this.el.dom.offsetWidth - this.scrollOffset)
+ ‘px‘;
var gs = this.getGroups();
for (var i = 0, len = gs.length; i < len; i++) {
if (gs[i] != undefined && gs[i].firstChild != undefined
&& gs[i].firstChild.style != undefined)
gs[i].firstChild.style.width = tw;
}
}
});
ext grid添加横向滚动条