1. #1
    Ext User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    thephatp is on a distinguished road

      0  

    Question GridPanel Renders Incorrectly when Collapsible panel above

    GridPanel Renders Incorrectly when Collapsible panel above


    I'm finally getting better at some of the components in Ext, but I'm having a real problem with a Grid rendering when a different collapsible panel above it is animated (collapsed and expanded).

    When the page is first rendered, I have two panels (Ext.FormPanel at top; Ext.GridPanel below) inside of an Ext.Panel container. Then, immediately below this, I have a separate Ext.Panel container to hold the details (when a user clicks on a row in the grid).

    Like I say, everything looks fine at first (the top FormPanel is expanded). However, when I collapse this FormPanel, the GridPanel rendering seems to mess up at the bottom of the grid and overlaps a little of the Details panel. Also, the problem occurs (and is MUCH worse) when I expand the FormPanel again. At this point, the extra part of the GridPanel (that filled up the extra space) actually expands below the GridPanel container and overlapp the Details (Ext.Panel) container below by quite a bit. And, it looks really "glitchy" (if that makes sense), so it's very obvious and looks really bad.

    Now, if I click on a row in the GridPanel, the Details panel "refreshes" the data, but it doesn't always clear the mess left over. Sometimes the "extra grid" is removed, and all looks normal again, but not always.

    Anyone have any ideas?

    Here is a snippet of the code (if I need to post more, just let me know):

    Code:
        fp = new Ext.FormPanel({
              frame: true
            , title:'Filters'
            , border: true
            , labelWidth: 70
            , collapsible: true
            , bodyStyle: 'padding:0 10px 0;'
            , items: [{ ... , <various form data> , ... }]
        });
    
        var grid = new Ext.grid.GridPanel({
              tbar:[
                  {
                    icon: '../../../scripts/ExtJS-2.2/resources/images/default/grid/refresh.gif'
                    , text: 'Refresh'
                    , iconCls: 'x-btn-icon-text'
                    , enableToggle: false
                    , handler: onRefreshGrid
                    , pressed: false
                }
            ]
            , store: myStore
            , colModel: myColModel
            , viewConfig: { forceFit: true }        
            , sm: new Ext.grid.RowSelectionModel( {singleSelect: true} )
            , frame: true
            , title: 'My Grid'
            , anchor: '100%, 100%'
            , loadMask: true
            , stripeRows: true
            , region: 'north'
            , split: true
        });
    
        var MainContainer = new Ext.Panel({
              renderTo: 'grid-example'
            , height: 530
            , width: 880
            , layout: 'form'
            , items: [
                  fp
                , grid
            ]
        });
        
        var DetailsContainer = new Ext.Panel({
              renderTo: 'Details'
            , title: 'Details'
            , height: 120
            , width: 880
            , id: 'detailPanel'
            , bodyStyle: { background: '#EEEEEE' , padding: '7px' }
            , html: 'Please select a row to see additional details.'
        });

  2. #2
    Ext User santosh.rajan's Avatar
    Join Date
    Sep 2007
    Location
    Kannur, Kerala, India
    Posts
    611
    Vote Rating
    0
    santosh.rajan is on a distinguished road

      0  

    Default


    Remove layout: form for the panel. And let me know if you still have a prob. You should not give layout: form for the panel. your definition of formpanel automatically sets layout: form for the form panel. your panel will have a default layou called container, (which is what you want one below the other).
    Make everything as simple as possible, but not simpler.
    - Albert Einstein

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Why don't you use a border layout to contain the two Panels?

  4. #4
    Ext User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    thephatp is on a distinguished road

      0  

    Default


    Quote Originally Posted by santosh.rajan View Post
    Remove layout: form for the panel. And let me know if you still have a prob. You should not give layout: form for the panel. your definition of formpanel automatically sets layout: form for the form panel. your panel will have a default layou called container, (which is what you want one below the other).
    When I remove the 'form' from the MainContent Panel, it makes the GridPanel height render incorrectly. Instead of filling the space, it shrinks it down to just enough to see the column headers, and that is it. I could remove the anchor and make a set height, but then it won't fill the space between the other two Panels.

    Basically, I want to have all three containers in one container, but I want the top and bottom containers (the form up top and the details pane at the bottom) to be collapsible, and the middle container (the GridPanel) fill the space between.

    Am I going about this incorrectly?

  5. #5
    Ext User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    thephatp is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    Why don't you use a border layout to contain the two Panels?
    Thanks Animal, it does seem to work in a border layout. I tried that before and it didn't work, but that's because I didn't have the regions set correctly (I missed one).

    One thing, though. I'd really like the containers to display some text when they are collapsed, so that the user can tell (remember) what is there when it is collapsed. (My end users may not be very computer savvy, so I really need to make it as easy as possible for them.) When the panel is collapsed, the title is no longer visible. I've searched through a bunch of the examples, but I can't find any that set's text here. Is it possible to do this?

    Thanks!

    Chad

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, this has been asked probably 50 times on the forum. There are hacks and overrides scattered everywhere to set the text in the collapsed element.

  7. #7
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default


    go there for panel title

    regards

    http://extjs.com/forum/showthread.php?t=46340

  8. #8
    Ext User
    Join Date
    May 2008
    Posts
    32
    Vote Rating
    0
    thephatp is on a distinguished road

      0  

    Default


    Quote Originally Posted by mnask79 View Post
    go there for panel title

    regards

    http://extjs.com/forum/showthread.php?t=46340
    I meant to post this earlier, but THANKS SO MUCH!

  9. #9
    Ext User
    Join Date
    Dec 2010
    Location
    Mexico
    Posts
    1
    Vote Rating
    0
    AMORANTE1508 is on a distinguished road

      0  

    Default GridPanel renders incorrectly when Collapsible panel above into a tabpanel

    GridPanel renders incorrectly when Collapsible panel above into a tabpanel


    Hi, I new in the forum, I have a problem with my panel, the problem is next:

    The structure is:

    - MainTabPanel
    - Panel
    - GridPanelSup
    -ToolBar
    - toggleHandler --> (event)
    - TabPanel
    - Tab 1
    - GridPanelInf
    - Dynamics Tabs ...

    1. When I toogleHandler my GridPanelSup no expand and i can´t see the information down.
    2. My tabpanel not expand when I collapse the panel

    I desesperate, Somebody can help me please????

    Code:
                    //*******************************************************************************************************
                    //                                           GRID PANEL SUPERIOR
                    //*******************************************************************************************************    
                                    
                    var gridContractData = new Ext.grid.GridPanel({
                        id: 'gridContractData_' + gConfigPage.idApplicationMenu + ':' + gConfigPage.idProcessDefinition + ':' + gConfigPage.idRequest,
                        store: dsGridContractData,
                        //anchor:'100% 100%',                     
                        height:80,                    
                        loadMask: true,
                        
                        cm: new Ext.grid.ColumnModel([                                
                            {header: 'Id Contrato', dataIndex: 'IdContrato'},
                            {header: 'Nombre Contrato', dataIndex: 'NombreContrato'},
                            {header: 'Tipo Crédito', dataIndex:'TipoCredito'}                        
                        ]),
                                 
                        frame:false,       
                        stripeRows: true,
                        tbar : [{
                            pressed: false,
                            enableToggle:true,
                            tooltip: {title:'Detalle',text:'Muestra el Acreditante, Fideicomisos y Empresas de cada Contrato'},
                            scope:this,                                             
                            text: 'Detalle',
                            iconCls: 'details',
                                                          
                            toggleHandler: function(btn, pressed){
                                gridContractData.togglePreview(pressed);
                            }           
                        }],
                        //bbar : [{}],
                        /*
                        listeners:{
                            'dblclick': evolucionWeb.oCreditAdminDispositionsActions.onCreditAdminGridDblClickDisposition
                        } */ 
                        
                        //Para esconder y mostrar la fila de Acreditantes, Fideicomisos y Empresas
                        viewConfig: {
                            autoFill:true,
                            forceFit:true,
                            enableRowBody:true,
                            showPreview:false,
                            getRowClass: function(record, rowIndex, p, ds) {
                                if (this.showPreview) {
                                    var xf = Ext.util.Format;
                                    
                                    var sAcreditantes = "";
                                    var sFideicomisos = "";
                                    var sEmpresas = "";
                                    
                                    var sColorA = " style = 'color:gainsboro'";
                                    var sColorF = " style = 'color:gainsboro'";
                                    var sColorE = " style = 'color:gainsboro'";                                
                                    
                                    if(record.data.Acreditantes != null) { 
                                        sColorA = " style = 'color:darkblue'";
                                        sAcreditantes = xf.stripTags(record.data.Acreditantes);
                                    }    
                                        
                                    if(record.data.FideicomisosAcreditados != null) {
                                        sColorF = " style = 'color:darkblue'";
                                        sFideicomisos = xf.stripTags(record.data.FideicomisosAcreditados); 
                                    }                                   
                                        
                                    if(record.data.EmpresasAcreditadas != null)  {
                                        sColorE = " style = 'color:darkblue'";
                                        sEmpresas = xf.stripTags(record.data.EmpresasAcreditadas);                                
                                    }    
                                                                                 
                                    p.body = '<p><div ' + sColorA + '><b>ACREDITANTES</b></div>' + sAcreditantes + '<p><br>' +
                                             '<p><div ' + sColorF + '><b>FIDEICOMISOS</b></div>' + sFideicomisos + '</p><br>' +
                                             '<p><div ' + sColorE + '><b>EMPRESAS</b></div>' + sEmpresas + '</p><br>';
                                    
                                    return 'x-grid3-row-expanded';
                                }
                                return 'x-grid3-row-collapsed';
                            }
                        },                      
                        togglePreview : function(show){               
                            this.view.showPreview = show;
                            this.view.refresh();
                        }                                                                                 
                    });
    
    //*******************************************************************************************************
                    //                                           GRID PANEL INF
                    //*******************************************************************************************************    
    
    var gridListDisp = new Ext.grid.GridPanel({
                        id: 'gridListDisp_' + gConfigPage.idApplicationMenu + ':' + gConfigPage.idProcessDefinition + ':' + gConfigPage.idRequest,
                        store: dsGridDispositions,
                        anchor:'100% 100%',                    
                        loadMask: true,
                        viewConfig: {forceFit:true}, 
                        sm: smCheckbox,  
                        cm: new Ext.grid.ColumnModel([            
                            smCheckbox,                       
                            {header: 'IdDisposicion', sortable: true, hidden: true, dataIndex: 'IdDisposicion'},
                            {header: 'Disposicion',   sortable: true, dataIndex: 'NumDisposicion'},
                            {header: 'Monto',         sortable: true, dataIndex: 'Monto'},
                            {header: '% Comision',    sortable: true, dataIndex: 'ComisionPorc'},
                            {header: '$ Comision',    sortable: true, dataIndex: 'ComisionCant'},
                            {header: 'Fecha',         sortable: true, dataIndex: 'Fecha'},
                            {header: 'Moneda',        sortable: true, dataIndex: 'Moneda'},
                            {header: 'Moneda',        sortable: true, hidden: true, dataIndex: 'IdContrato'}
                        ]),
                                 
                        frame:false,       
                        stripeRows: true,
                        tbar : tbDispositions,
                        bbar : [{}],
                        
                        listeners:{
                            'dblclick': evolucionWeb.oCreditAdminDispositionsActions.onCreditAdminGridDblClickDisposition
                        }                                                                                   
                    });
    
    //*******************************************************************************************************
    //                                         PANELS  //*******************************************************************************************************    
    var panelContractData = new Ext.Panel ({
                        id: 'panelContractData_' + gConfigPage.idApplicationMenu + ':' + gConfigPage.idProcessDefinition + ':' + gConfigPage.idRequest,
                        //anchor:'100% 70%',                    
                        flex: 0,
                        frame:true,
                        collapsible:true,
                        animCollapse:true,
                        title:'Datos del Contrato',                    
                        layout:'anchor',
                        //layoutConfig:{align:'middle'},
                        items:gridContractData                    
                    });
                    
                    var TabPanelListDisp = new Ext.TabPanel ({
                        id: 'TabPanelListDisp_' + gConfigPage.idApplicationMenu + ':' + gConfigPage.idProcessDefinition + ':' + gConfigPage.idRequest,
                        activeTab: 0,
                        //anchor:'100% 70%',                    
                        flex: 3,                    
                        items: [
                            {
                                //xtype: 'panel',
                                title: 'Disposiciones',                            
                                frame:false,
                                items: gridListDisp,
                                layout:'anchor'                            
                            }
                        ]
                    });             
                    
    
              var MainPanelTab = new Ext.Panel({ 
                        id: 'MainPanelTab_' + gConfigPage.idApplicationMenu + ':' + gConfigPage.idProcessDefinition + ':' + gConfigPage.idRequest,
                        title: '',                                        
                        layout:'vbox',
                        layoutConfig:{align:'stretch'},
                        frame: true, 
                        items:[
                            panelContractData,                        
                            TabPanelListDisp                        
                        ]                                     
                    });

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