PDA

View Full Version : Extjs gridpanel doesn't expand horizontally within a tabPanel



Syed Huda
24 Feb 2011, 2:06 PM
Hi,

Extjs gridpanel doesn't expand horizontally within a tabPanel, and I'm already doing a forceFit true.

Here's my tabbed panel code:

var tabs = new Ext.TabPanel({
renderTo: 'tabbedResult',
width: 700,
plain:true,
activeTab: 0,
items:[
{contentEl:'graphResult', title:'Probability of Default'},
{contentEl:'financialResult', title:'Credit Factors'},
{contentEl:'aaResult', title:'Attribution Analysis'}
]
});

Here's the gridpanel


var financialGrid = new Ext.grid.GridPanel({
store: financialStore,
columns: [
{header: scoreresultrelc_title10, width: 40, sortable: true, dataIndex: 'data_item_name' },
{header: '', width: 20, sortable: true, dataIndex: 'data_item_unit_name'},
{header: scoreresultrelc_title10 , width: 60, hidden: true, hideable: false, dataIndex: 'data_item_name_eng'},
{header: singlescore_title19 + ' 1', width: 20, sortable: true, dataIndex: 'year1' },
{header: singlescore_title19 + ' 2', width: 20, sortable: true, dataIndex: 'year2' },
{header: singlescore_title19 + ' 3', width: 20, sortable: true, dataIndex: 'year3' },
{header: singlescore_title19 + ' 4', width: 20, sortable: true, dataIndex: 'year4' },
{header: singlescore_title19 + ' 5', width: 20, sortable: true, dataIndex: 'year5' },
{header: scoreresultrelc_title14, width: 20, hidden: true, hideable: false, dataIndex: 'group'},
{header: '', width: 20, hidden: true, hideable: false, dataIndex: 'display_data_item_seq'}
],
view: new Ext.grid.GroupingView({
forceFit:true
}),
title: 'Financial Items',
iconCls: 'icon-grid',
renderTo: 'financialResult',
frame: true,
footer: true,
buttonAlign: 'left',
buttons: [{
text: 'Run Scenario',
handler: function() {
Ext.get('scenario').dom.value="true";
resultsgridForm.getEl().dom.submit();
}
}]
});

This is what the GridPanel looks like:
24846