Results 1 to 3 of 3

Thread: Layout Problem

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore
    Posts
    66
    Answers
    1

    Default Answered: Layout Problem

    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 .

    Ext.getCmp('centerPanel').add({
    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 ?

    Thanks
    Sabareesh.

  2. 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.

  3. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    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.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore
    Posts
    66
    Answers
    1

    Default

    Thanks Mitchell

    I will try that .


    Thanks,
    Sabareesh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •