PDA

View Full Version : Grid within a Tabpanel isn't auto expanding when dragged into a portal column



abcdef
14 May 2010, 10:03 AM
Hello,

I am having trouble making a grid panel auto expand within a tabpanel when it is dragged into a different grid column in a portal environment.

If anybody knows what I am talking about, please help.

Here is the code in brief:



var GenericPortletWrapper = new Ext.TabPanel({
name: 'PortletWrapperPanel',
activeTab: 1,
enableTabScroll: true,
style: 'margin: 5px;',
draggable: true,
defaults: {
autoScroll: true
}
});

var TwitterPortlet = {
text: 'Twitter Feed',
layout: 'fit',
height: 400,
autoScroll: true,
bodyBorder: false,
/*
tools: TwitterPortletSettingsTool,
*/
items: [
{
xtype: 'grid',
bodyBorder: false,
store: CustomTwitterSearchResultsStore,
autoExpandColumn: 1,
stripeRows: true,
colModel: CustomTwitterColumnModel
}
],
state: [
{
portletId: 'Twitter',
SearchTerm: '',
ResultsCount: '20'
}
]
};

GenericPortletWrapper.add({
title: 'Main',
height: 400,
items: [
TwitterPortlet
]
});


So when dragged into a column with larger width, the tabpanel itself expands but 'TwitterPortlet' automatically does not and retains its size from the smaller column. When clicked on another tab and clicked back, it does take up the whole space but it doesn't auto fit right after its dropped.

Any ideas? Please help!

Thanks.

abcdef
14 May 2010, 10:46 AM
Just a quick note, tabpanel itself expands but the grid does not. I have a settings tab (xtype: form) right next to the tab that holds the grid and it expands and shrinks correctly when dropped into a different size portal column but the grid does not do it automatically. It does it only when I change to another tab and come back to it.

Any ideas at all?