PDA

View Full Version : Add paging to image chooser



DavidY
13 Oct 2009, 7:56 AM
Hi,

Im working off this example - http://www.extjs.com/deploy/dev/examples/view/chooser.html and trying to add paging to it.

I have added the following code


this.pagesize = 6;
this.paging_toolbar = new Ext.PagingToolbar({
pageSize: this.pagesize,
displayInfo: true,
emptyMsg: 'No images found',
store: this.store
})

and changed


this.store.load();

To



this.store.load({params:{start:0,limit:this.pagesize}});

And to the window cfg at the bottom added


bbar:this.paging_toolbar

I can see the paging bar ok at the bottom of the window, and I can see that it has 13 items in it so its reading the store correctly. But the dataview seems to be ignoring the paging data completely, what do I need to change?

jay@moduscreate.com
29 Oct 2009, 5:22 AM
can you post the JavaScript that you are using for this?

The paging toolbar binds to the store to control the Data*view*