1. #1
    Ext JS Premium Member
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    263
    Vote Rating
    1
    maquejp is on a distinguished road

      0  

    Question Accordion, grid scroll

    Accordion, grid scroll


    Hello,

    I have designed a accordion panel that contains two (until now) panel. On the second and third panel I put gridpanel.
    I have a main grid that load the data.store of each "child" gridpanel.

    For the first row of my main grid I should have 13 rows in the first "child" grid. I go ("expand") the panel that contains the first "child" grid and it only show 3 rows and no scroll.
    Now two case:
    1) I go ("expand") my first panel, click on the second row of the main grid and go ("expand") back on the second panel, still 3 rows and no scroll
    2) I stay on the second panel hosting the "child" grid and click on the second row of my main grid. And "abracadabra" the full rows listing is displayed with the scroll bar...

    My understanding is that my "child" gridpanel rendering is not done when the panel that is not hosting it is not activated.

    I try (see the code) to expand the panel that contains the gridpanel before the datastore.load() and them expand back the first panel, without success.
    I try to add too after the datastore.load():
    Code:
            Ext.getCmp('p_tabpartner').expand();
            ds_allptnr.proxy = new Ext.data.HttpProxy({url:'qry/get/get_allpartnr.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allptnr.load();
            p_tabpartner.doLayout();
            gp_allptnr.doLayout();

    Code:
    gp_gridlp.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
            loc_adonis_saved = r.data.id_adonis;
            
            fp_tabprojectdetail.getForm().load({
                url:'qry/get/get_l1p.cfm?v_adonis='+r.data.id_adonis,
                method:'GET',
                waitMsg:'Loading',
                success: function(form,action) {
                    fp_tabprojectdetail.setVisible(true);
                    },
                failure: function(form,action) {
                    fp_tabprojectdetail.setVisible(false);
                    Ext.MessageBox.alert('Failure','System can not be reached [fp_tabprojectdetail]');
                    }
                });
            
    
            Ext.getCmp('p_tabpartner').expand();
            ds_allptnr.proxy = new Ext.data.HttpProxy({url:'qry/get/get_allpartnr.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allptnr.load();
            
            Ext.getCmp('p_tabwps').expand();
            ds_allwps.proxy = new Ext.data.HttpProxy({url:'qry/get/get_wps.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allwps.load();
    
            Ext.getCmp('p_tabprojectdetail').expand();
        
    });

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    263
    Vote Rating
    1
    maquejp is on a distinguished road

      0  

    Default


    I found a workaround, but I am still open for a better solution

    So:
    1) I expand the second panel
    2) I do my data.store.load();
    3) I reconfigure the grid with the same DS and CM
    4) I expand the first panel

    Extract
    Code:
            Ext.getCmp('p_tabpartner').expand();
            ds_allptnr.proxy = new Ext.data.HttpProxy({url:'qry/get/get_allpartnr.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allptnr.load();
            gp_allptnr.reconfigure(ds_allptnr,cm_allptnr);
    Full 'rowselect'
    Code:
    gp_gridlp.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
            loc_adonis_saved = r.data.id_adonis;
            
            fp_tabprojectdetail.getForm().load({
                url:'qry/get/get_l1p.cfm?v_adonis='+r.data.id_adonis,
                method:'GET',
                waitMsg:'Loading',
                success: function(form,action) {
                    fp_tabprojectdetail.setVisible(true);
                    },
                failure: function(form,action) {
                    fp_tabprojectdetail.setVisible(false);
                    Ext.MessageBox.alert('Failure','System can not be reached [fp_tabprojectdetail]');
                    }
                });
            
    
            Ext.getCmp('p_tabpartner').expand();
            ds_allptnr.proxy = new Ext.data.HttpProxy({url:'qry/get/get_allpartnr.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allptnr.load();
            gp_allptnr.reconfigure(ds_allptnr,cm_allptnr);
            
            
            Ext.getCmp('p_tabwps').expand();
            ds_allwps.proxy = new Ext.data.HttpProxy({url:'qry/get/get_wps.cfm?v_adonis='+r.data.id_adonis,method:'GET'});
            ds_allwps.load();
            gp_allwps.reconfigure(ds_allwps,cm_allwps);
    
            Ext.getCmp('p_tabprojectdetail').expand();
        
    });