PDA

View Full Version : Grid in a tab, not filling height



Krishopper
27 Nov 2010, 3:45 PM
I have a grid in a tab being created dynamically (with the following):


Application.DomainViewById = Ext.extend(Ext.TabPanel, {
border: false
,domainData: null
,initComponent:function() {
var config = {
activeTab: 0
,title: 'Domain: ' + this.domainData['name']
,items: [{
title: 'General'
,html: 'Domain: ' + this.domainData['name']
},
new Application.DNSResourceRecordGrid({id: 'domain-dns', title: 'DNS', DnsZoneId: this.domainData['dns_zone_id']
})
,{
title: 'Website'
,html: 'website'
},{
title: 'Email'
,html: 'zimbra'
}
]
};


I have to create it dynamically since it depends on variables that are set in the "domainData" variable. When the 'DNS' tab is clicked on, the grid only shows the first line. I assume this is because it will require a .doLayout() call, but I'm not sure how/where to get that in.

Is there a better way to accomplish this?

Krishopper
27 Nov 2010, 8:40 PM
I resolved this issue. Looks like I missed setting a layout manager on a parent Ext.Panel. Fixing that resolved my issue.

wanderArounder
28 Nov 2010, 9:43 PM
I resolved this issue. Looks like I missed setting a layout manager on a parent Ext.Panel. Fixing that resolved my issue.

You just fixed my issue as well. Thanks for posting your fix. Adding "layout: 'fit'" did the trick.