PDA

View Full Version : [OPEN-1392] Ext.grid.PivotGridView.onLayout does not resize properly in fit layout



Barzoy
9 Nov 2010, 6:32 AM
Ext version tested:

Ext 3.3.0


Adapter used:

ext


css used:

only default ext-all.css




Browser versions tested against:

crossbrowser issue


Operating System:

WinXP Pro


Description:

Ext.grid.PivotGridView.onLayout does not resizes div.x-grid3-header-inner and div.x-grid3-body elements (this.innerHd and this.mainBody properties, where "this" is an instance of Ext.grid.PivotGridView)


Steps to reproduce the problem:

Just create PivotGrid component inside any resizeable container with layout = "fit" (window for example) and try to resize this container.


The result that was expected:

grid fits its container, no horizontal scrollbar is visible


The result that occurs instead:

grid fits its container but horizontal scrollbar is visible


Screenshot or Video:

attached


Possible fix:
Original code from src/PivotGridView.js


onLayout: function(width, height) {
Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments);

var width = this.getGridInnerWidth();

this.resizeColumnHeaders(width);
this.resizeAllRows(width);
}


Fixed code


onLayout: function(width, height) {
Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments);
var w = this.getGridInnerWidth();

this.resizeColumnHeaders(w);
if (this.innerHd) {
this.innerHd.style.width = (w) + "px";
}
this.mainBody.setWidth(w);
this.resizeAllRows(w);
};