-
8 Nov 2007 5:34 PM #21
FYI, we're following this thread and will take a look at the issue.
-
11 Nov 2007 2:14 PM #22
-
11 Nov 2007 5:59 PM #23
go it 我想知道这个答案的呢.
go it 我想知道这个答案的呢.
你们好啊,我也遇到了这样子的一个问题,但也没有能够很好去解决这个问题,希望你们能给出一个很好的想法,或是意见什么的呢,
一直关注的啊.
-
11 Nov 2007 6:29 PM #24
-
12 Nov 2007 7:19 AM #25Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
consider this a temporary patch until Jack & Team can get the official fix out.
PHP Code:Ext.override(Ext.layout.ContainerLayout,{
layout : function(){
var target = this.container.getLayoutTarget();
// this is to fit the body el to the wrapper again...
if ( this.container.bwrap ) {
var w=this.container.bwrap.getBox().width;
if(this.container.frame){
w-=this.container.getFrameWidth();
}
if(w!=target.getBox().width){
//alert("Resizing container from "+target.getBox().width+" to "+w);
target.setWidth(w);
}
}
this.onLayout(this.container, target);
}
});
Ext.override(Ext.grid.GridView,{layout : function(){
if(!this.mainBody){
return; // not rendered
}
var g = this.grid;
var c = g.getGridEl(), cm = this.cm,
expandCol = g.autoExpandColumn,
gv = this;
var csize = c.getSize(true);
csize.width=g.getEl().getBox().width;
var vw = csize.width;
if(!vw || !csize.height){ // display: none?
return;
}
if(g.autoHeight){
this.scroller.dom.style.overflow = 'visible';
}else{
this.el.setSize(csize.width, csize.height);
var hdHeight = this.mainHd.getHeight();
var vh = csize.height - (hdHeight);
this.scroller.setSize(vw, vh);
this.innerHd.style.width = (vw)+'px';
}
if(this.forceFit){
if(this.lastViewWidth != vw){
this.fitColumns(false, false);
this.lastViewWidth = vw;
}
}else {
this.autoExpand();
}
this.onLayout(vw, vh);
}
});

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
12 Nov 2007 1:15 PM #26
Some things to try:
- Remove autoScroll:true from the GridPanel
- width:'800' is invalid. You want width:800
- A grid cannot have an auto width. It must either have a width set or be part of a layout which will manage setting its width.
-
12 Nov 2007 1:17 PM #27Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
Welcome back my man!

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
12 Nov 2007 3:08 PM #28
Does sticking it in a container without a specified width count?
var container = new Ext.Container({applyTo: element_id,
layout: 'fit',
items: this.grid});
Cheers for posting.. couldn't get it to resize the grid. I'm wondering if we've got slightly different setup. I've just got a single GridPanel with almost no settings wrapped in the fit layout shown above.consider this a temporary patch until Jack & Team can get the official fix out.
It didn't run because bwrap in this.container is undefined (checked through firebug). brwap only seems to be definied in panel layouts.
I've also tried just on the gridpanel itself using:Code:Ext.override(Ext.layout.ContainerLayout,{ layout : function(){ var target = this.container.getLayoutTarget(); // this is to fit the body el to the wrapper again... if (this.container.bwrap) {
Code:new Ext.grid.GridPanel({applyTo: 'myelementid', store: ds, cm: colModel})
-
12 Nov 2007 5:08 PM #29Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
wrap your grid in a panel and your fine then --- for now


Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
12 Nov 2007 5:43 PM #30
I tried that.. but the target.getBox then isn't the offending grid so it didn't resize.
I'm organising a party if I manage to get this working


Reply With Quote
