1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    8
    Vote Rating
    0
    ssswdon is on a distinguished road

      0  

    Default 2 grids in card layout with dynamic sizes

    2 grids in card layout with dynamic sizes


    Hi,

    I have a card layout and I am trying to get the auto height to work. I am using the Ext.grid.panel and including them as follows.
    When I search on one grid then switch to the other by using panel.getLayout().setActiveItem(1)/or 0 The panel doesn't re size to accommodate the size of the displayed grid. I have even tried to use setHeight in the refresh event but it has bad side effects.

    Any idea how to setup multiple grids that have dynamic sizes. Oh yeah one more thing. We don't use scroll bars The app displays the whole page with no scrollbar.

    I have seen at times that when i set the height on the panel based on the grid.getHeight() that the height is incorrect. The actually table behind the grid is much larger.



    Code:
                
    var inner = Ext.create('Ext.panel.Panel', {
                    title: 'multiple grids',
                    layout: 'card',
                    id:'cardPanel',
                    //autoHeight:true,
                    bodyStyle: 'padding:0px',
                    title:false,
                    defaults: {
                        border: true
                    },
                    items: [me.grid1, me.grid2],
                    renderTo:'results'
                });
    example of the setting used for the grids
    Code:
              
    
    var searchResultGrid = new Ext.grid.GridPanel({
                 id : 'bobResultGrid',   
                 cls:'advisorDashboardGrid',
                 bodyCls:'advisorDashboardGrid-body',
                 scroll:false,
                 store: pagingStore,
                 columns: [{
                     menuDisabled: true,
                  }],
    viewConfig: { forceFit:true, showPreview:false, emptyText: Config.grid_no_data
    },
    // paging bar on the bottom tbar: top_bar

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    card layout will handle the sizing of it's direct children.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    8
    Vote Rating
    0
    ssswdon is on a distinguished road

      0  

    Default


    That's what I thought also.. But if I dig into the grid div the underlying table has a different height and overflows the grid container. So the rows out side the grid container are being hidden

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    8
    Vote Rating
    0
    ssswdon is on a distinguished road

      0  

    Default


    Any thoughts on what config I need to make this work?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi