Results 1 to 3 of 3

Thread: Grid Disappearing on Panel Collapse

  1. #1
    Ext User
    Join Date
    Jan 2010
    Location
    Missouri
    Posts
    9

    Default Grid Disappearing on Panel Collapse

    I have a grid in the Center region Panel and when I collapse the West Region the Grid disappears.

    I have no idea why. Can someone please help?

    My ColumnModel, Reader and Grid are all created in a function call. Here is a piece of that function:
    PHP Code:
    // Create Grid Panel
        
    var grid = new Ext.grid.GridPanel({
            
    storestore//the DataStore object to use (ds: is shorthand)
            
    colModelcolModel//gets the ColumnModel object to use (cm: is shorthand)
            
    autoheighttrue//you must specify height or autoHeight
            
    stripeRowstrue//Alternate Row color
            
    forceFittrue,
            
    autoSizeColumnstrue,
            
    selModel: new Ext.grid.RowSelectionModel({singleSelect:false}),
            
    el'center-region-container',
            
    loadMasktrue
        
    });
        
        
    // Add GridPanel to mainPanel
        
    crc Ext.getCmp('center-region-container');
        
    crc.removeAll();
        
    crc.add({
            
    itemgrid,
            
    titletitle
        
    });
        
    crc.doLayout();
        
        
    // Display the Grid
        
    grid.render(); 
    When I first enter the function the Grid is rendered with data and the Title in the Center region is not visible. if I collapse the West Region, the grid disappears and the Title displays.

    I would like to get the title to display with the grid and remain visible wether the West region is expanded or collapsed.

    Any help would be appreciated.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    Never call render() if you're dealing with layouts, it happens automatically.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext User
    Join Date
    Jan 2010
    Location
    Missouri
    Posts
    9

    Default

    Never call render() if you're dealing with layouts, it happens automatically
    If I remove grid.render(); the Title loads in the center region but the grid does not????


Posting Permissions

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