timo.nuros
4 Oct 2007, 12:19 AM
Hi,
I've got a complex borderLayout which includes a nestedLayout on a hidden tab, and that nestedLayout contains split borderLayout with a grid. I was debugging for at least 8 hours to find out why the grid doesn't fit to the height of the container. The layout is completely created from JavaScript, no single HTML fragment exists.
My grid has explicitely set autoHeight: false in the configuration.
I started debugging the ext library and found this one in grid.js around line 392:
render : function(){
var c = this.container;
// try to detect autoHeight/width mode
if((!c.dom.offsetHeight || c.dom.offsetHeight < 20) || c.getStyle("height") == "auto"){
this.autoHeight = true;
}
This is where it fails. If I explicitely set grid.autoHeight=false after calling render(), it works. In my case, autoHeight is set by render() because c.dom.offsetHeight is not defined, most probably because the grid is placed on a tab which contents are initially invisible and where the layout engine didn't update anything yet.
I feel that this behaviour is a bug and should be fixed, if it exists in 2.0.
If you need a code sample, please let me know.
cheers,
Timo
I've got a complex borderLayout which includes a nestedLayout on a hidden tab, and that nestedLayout contains split borderLayout with a grid. I was debugging for at least 8 hours to find out why the grid doesn't fit to the height of the container. The layout is completely created from JavaScript, no single HTML fragment exists.
My grid has explicitely set autoHeight: false in the configuration.
I started debugging the ext library and found this one in grid.js around line 392:
render : function(){
var c = this.container;
// try to detect autoHeight/width mode
if((!c.dom.offsetHeight || c.dom.offsetHeight < 20) || c.getStyle("height") == "auto"){
this.autoHeight = true;
}
This is where it fails. If I explicitely set grid.autoHeight=false after calling render(), it works. In my case, autoHeight is set by render() because c.dom.offsetHeight is not defined, most probably because the grid is placed on a tab which contents are initially invisible and where the layout engine didn't update anything yet.
I feel that this behaviour is a bug and should be fixed, if it exists in 2.0.
If you need a code sample, please let me know.
cheers,
Timo