-
1 Dec 2009 10:10 AM #1
Problem with bindStore and PagingToolbar
Problem with bindStore and PagingToolbar
Hi guys!
I have a PagingToolbar in grid and I need to change store's proxy url. Ok, all right, except the paging continues using old store.
I read the docs and I saw:
Be aware that upon reconfiguring a GridPanel, certain existing settings may become invalidated. For example the configured autoExpandColumn may no longer exist in the new ColumnModel. Also, an existing PagingToolbar will still be bound to the old Store, and will need rebinding. Any plugins might also need reconfiguring with the new data.
So I tryed to use: paging.bindStore(store) but that did not work.
Can You help me?
Thanks!
-
15 Dec 2009 9:09 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
it should work.
Code:bindStore : function(store, initial){ var doLoad; if(!initial && this.store){ if(store !== this.store && this.store.autoDestroy){ this.store.destroy(); }else{ this.store.un('beforeload', this.beforeLoad, this); this.store.un('load', this.onLoad, this); this.store.un('exception', this.onLoadError, this); } if(!store){ this.store = null; } } if(store){ store = Ext.StoreMgr.lookup(store); store.on({ scope: this, beforeload: this.beforeLoad, load: this.onLoad, exception: this.onLoadError }); doLoad = true; } this.store = store; if(doLoad){ this.onLoad(store, null, {}); } },
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.


Reply With Quote