1. #1
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default How to avoid proxy of Parent Grid Panel?

    How to avoid proxy of Parent Grid Panel?


    Hi,

    In my application I have two grid panel. GP1 and GP2.

    In GP1, I am using proxy and hitting url of server. GP2 extend GP1 and in GP2, I don't want any proxy as data of GP2 are not coming from server.

    Now, when I click on any column of GP2 it fires server url of GP1 (call proxy of GP1). How to avoid proxy of GP1 when I do sorting on GP2

  2. #2
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default


    Actually scenario is different. It is not due to proxy.

    But, in parent grid (GP1), I have implemented one function say doSorting on 'sortchange' event.

    So, in GP2, it is also calling parent's doSorting method.

    I have overridden that method in GP2 but it has stopped grid level (client side) sorting also.

    How, to prevent default behavior of grid sorting and prevent parent method calling?

    Hope, I am cleared.

    thanks

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    GP1 and GP2 should not be using the same store.

    GP2 clearly doesn't need a proxy and should be remoteSort:false, so it needs it's own store.

  4. #4
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    GP1 and GP2 should not be using the same store.

    GP2 clearly doesn't need a proxy and should be remoteSort:false, so it needs it's own store.
    Yes...both Grid Panel has their own store. I am not using same. But still problem exist and in GP2 I have set remoteSort:false also.

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    How did you define G1 and G2?

  6. #6
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    How did you define G1 and G2?
    Refer below code snippets..

    Code:
    App.G1 = Ext.extend(Ext.GridPanel, {
     ........
    ........
    // define store here for G1........
    ........
    });
    
    App.G2 = Ext.extend(App.G1, {
     ........
    ........
     // define store here for G2........
     ........
    });

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You can't define a store in the prototype! You need to create the store in the constructor or initComponent.

  8. #8
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default


    Yes...I did same thing...
    In init method of each grid, I have defined store like below (dont go on syntax, its just pseudo code...)
    Code:
    initComponent:function() {
    
               ..........
               ..........
               this.store = new Ext.data.JsonStore({
                    fields : fields,
                    data: {"data":[]},
                    autoLoad : false,
                    remoteSort : false
                });
               ..........
               ..........
    }

  9. #9
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Ah, exactly what I don't like about initComponent!

    This code in G2 will create a store, next it calls the G1 superclass initComponent that overrides the store with it's own store.

    This wouldn't have happend when you would have applied the store to the config object in the constructor.

  10. #10
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
    livinglegends is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Ah, exactly what I don't like about initComponent!

    This code in G2 will create a store, next it calls the G1 superclass initComponent that overrides the store with it's own store.

    This wouldn't have happend when you would have applied the store to the config object in the constructor.
    So, what is better way? plz provide some code hint..

Similar Threads

  1. Go direct to proxy and avoid sync() batching
    By termy21 in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 26 Dec 2010, 10:06 AM
  2. GRID PANEL WHIT 100% OF DIV PARENT
    By fhuggler in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 21 May 2010, 3:37 PM
  3. Proxy undefined by changing the page in grid panel
    By diablo in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Jan 2010, 3:29 AM
  4. grid parent container on a form panel
    By jeremy.hennegrave in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 30 Apr 2008, 5:14 AM
  5. Grid Panel to fit in Parent witdh scroll bars
    By karel-jan in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 15 Apr 2008, 6:10 AM

Thread Participants: 1

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