View Full Version : Layout Problem

16 Jan 2013, 1:34 AM
I have a panel of hbox layout , in which one is tree panel and other one is a empty panel named as 'centerPanel'.

So when a particular leaf in the tree panel is clicked i add items to the centerPanel .In my case i add a tab panel which consists of a grid .

xtype: 'tabpanel',
layout : 'fit',
id : 'myTab',
items : [{
title : 'ABC',
layout : 'fit',
items : [{
xtype :'myGrid'
'myGrid' contains a paging toolbar where i display 20 records per page.( say total records is 30)
Everything is working fine , except that , the scroll bar not appearing for the first time in the grid and i can see only 19 records in grid . If i move to second page (which shows 10 records) , and come back to first page then the scroll bar is appearing and i am able to scroll through the 20 records.

I also tried Ext.getCmp('myGrid').doComponentLayout(); which is not working through my code , if is paste the same line in my firebug then i get the scroll bar.

Am i missing something ?


17 Jan 2013, 1:54 PM
2 things I se wrong. You shouldn't set the layout on the tabpanel, it should handle itself.

You are overnesting the grid, the grid doesn't need to be nested within a container with fit layout, have it as a direct child of the tabpanel.

17 Jan 2013, 8:25 PM
Thanks Mitchell

I will try that .