1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    50
    Vote Rating
    0
    bitdifferent is on a distinguished road

      0  

    Default Lazy Loading an unusually complex grid (pivot table)

    Lazy Loading an unusually complex grid (pivot table)


    I have a grid which I don't want to fully render until the tab on which it resides is displayed. Ordinarily I would do this by not loading the grid's store until the tab is displayed. However the grid in question is a pivot table /crosstab affair which I've hacked together so that it uses two stores... long story and if others are interested I'll publish the code when I have time.

    Anyway, how it works is:

    - load data store 1 (which is large);
    - iterate over its records to create a column model and a second store
    - create a grid using those (pivoted cell renderers look into store 1 for values)

    To add a GridPanel to my layout region, the grid needs to exist first... and that means I'd need to load my expensive first store. So as I see it I have three options:

    1) Hack GridPanel to work ok without a grid at first (or allow it to be changed) , extending it with a 'setgrid' method or similar

    2) Hack ContentPanel to allow it to mutate into a GridPanel after its created

    3) Have a proxy contentpanel which when clicked upon destroys itself and loads a gridpanel in its place - probably with a visible flash in the ui which I'm not keen on.

    Any suggestions or other ideas?

    TIA

    Matt S.

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    216
    Vote Rating
    0
    Jul is on a distinguished road

      0  

    Default


    Yes, I would be interested to know how you implemented the pivot table/crosstab structure. I have been in the process of contemplating a design of such a beast and would be interested in seeing your approach.

    - Jul

  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    50
    Vote Rating
    0
    bitdifferent is on a distinguished road

      0  

    Default


    okay I'm going for option 1.5 - extend ContendPanel as 'LazyGridPanel', which initially behaves just like a contentpanel but after a call to setGrid adopts the behaviour of a GridPanel. Hopefully!

  4. #4
    Ext User
    Join Date
    Apr 2007
    Posts
    50
    Vote Rating
    0
    bitdifferent is on a distinguished road

      0  

    Default


    Yes, that works really well. I've got three of these nasty pivot grids to adapt to this new 'LazyGridPanel' structure but I'll post some more details when I can.

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    89
    Vote Rating
    3
    amackay11 is on a distinguished road

      0  

    Default


    Hey Matt,

    I am struggling with a similar issue. When issuing my server request, I don't know what columns will be returned. Essentially a crosstab type query. I need to dynamically build the column model after the data has been returned and populate my gird. I've considered making two server requests, one to get the columns and another to get the actual store but this seems very inefficient.

    Anyways, I'm interested to see how you iterate over the records to create the column model. Any code you can post or send would be great!
    Andy

Thread Participants: 2

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