-
29 Dec 2010 2:52 AM #1
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
-
29 Dec 2010 3:08 AM #2
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
-
29 Dec 2010 4:06 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
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.
-
29 Dec 2010 4:07 AM #4
-
29 Dec 2010 4:33 AM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
How did you define G1 and G2?
-
29 Dec 2010 4:39 AM #6
-
29 Dec 2010 4:42 AM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
You can't define a store in the prototype! You need to create the store in the constructor or initComponent.
-
29 Dec 2010 4:45 AM #8
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 }); .......... .......... }
-
29 Dec 2010 4:51 AM #9Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
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.
-
29 Dec 2010 4:53 AM #10
Similar Threads
-
Go direct to proxy and avoid sync() batching
By termy21 in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 26 Dec 2010, 10:06 AM -
GRID PANEL WHIT 100% OF DIV PARENT
By fhuggler in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 21 May 2010, 3:37 PM -
Proxy undefined by changing the page in grid panel
By diablo in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 13 Jan 2010, 3:29 AM -
grid parent container on a form panel
By jeremy.hennegrave in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 30 Apr 2008, 5:14 AM -
Grid Panel to fit in Parent witdh scroll bars
By karel-jan in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 15 Apr 2008, 6:10 AM


Reply With Quote