-
17 Jan 2009 2:38 AM #11
Is posible Live examples?
-
19 Jan 2009 2:56 PM #12
@dolittle
I like the idea. That would make it much quicker for the userYou can load 100 items each time but have the page size set to 10 so the user gets much better user experience. When the user gets to page 10, the extension will automatically load the next 100 items from the server.
What would happen if the user typed in a page number?
I guess they would just have to wait
@Condor I managed to look at it again and I did not have the params set up correctly
It looks like it will work as it behaves correctly after clicking the "Refresh" button
I tried to figure out how to fire the same functionality when it was initially loaded but I am struggling to walk the code and find out why maybe the event did not fire the event handler on load of the grid. It maybe something I have missed on setting up the store or grid?
What I also think would be nice(there may be an extension out already that I haven't seen)
How about allowing users to navigate the grid by displaying a "navigational bar" on the grid based on their sorted column.At the moment if this is a large dataset they have to take a best guess at the page where they might find the information they are looking for.
So for large data that contained a sorted column string, paging would mean choosing an "a,b,c,d...z" item. This would allow users to go straight to the strings that began with that letter. Jeez I hope that makes sense
Andy
-
20 Jan 2009 1:12 AM #13
-
20 Jan 2009 2:16 AM #14
Yes just another way to skin a cat I guess but maybe more usable than applying filtersWouldn't that almost be the same as filtering?
It also does not return a subset of data but takes you to the specific place in the record set
The live grid example I know doesnt have paging but could also benefit from it as well
It would take you to a point where you could begin your search rather than scrolling back and forth
I could not find the Paging/Filter plugin.There is a user extension that allows filtering from the (paging) toolbar
I could find some that use a drop downmenu to return a subset of the data however
-
20 Jan 2009 3:26 AM #15
-
27 Jan 2009 10:11 PM #16
Any special requirements for paging local data ?
Any special requirements for paging local data ?
Hi there,
First of all, thanks for this awesome extension but I have problem getting it to work completely.
1. First I have a reader (ArrayReader) and a PagingStore as below :
Code:dataset = new Ext.ux.data.PagingStore({ reader: new Ext.data.ArrayReader( {}, [{name: 'item_name'}, {name: 'item_name_short'} ] ), lastOptions: { params: { start: 0, limit: 6} } }); //and i insert some records into the store later for (var j = 0; j < ls_reqdata.length; j++) { dataset.add(new Ext.data.Record(ls_reqdata[j])); }
2. I create the PagingToolBar and DataView as below:
The DataView displays and gets filtered correctly according to lastOptions params, but the Previous and Next buttons are still disabled and paging shows "Page 1 of 1" (whereas it should display 4 pages as I have 20 over records), and clicking on Refresh button, it still loads the same records.Code:this.pagingtoolbar = new Ext.PagingToolbar({ id: this.id + '_pagingtoolbar', pageSize: 6, store: this.contentstore, //displayInfo: true, displayMsg: 'Displaying topics {0} - {1} of {2}', emptyMsg: "No topics to display" }); this.contentdataview = new Ext.DataView({ id: this.id + '_content_dv', store: this.contentstore, tpl: tpl, style: 'border: none; overflow-y: auto; overflow-x: hidden', multiSelect: false, overClass: 'x-view-over', itemSelector: 'div.content-wrap', emptyText: 'No images to display', onClick: function(dv, index, htmlnode, e) { //handle click here.... } });
P/S - I have also overridden the PagingToolbar as advised earlier in this thread.
What am I missing here ?.. or do I need to use specific type of reader to get the PagingStore working correctly ?
Thanks in advance.
-
27 Jan 2009 10:52 PM #17Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
New records always get added to the current page. You should load the data instead, e.g.
orCode:var dataset = new Ext.ux.data.PagingStore({ reader: new Ext.data.ArrayReader({ },[ {name: 'item_name'}, {name: 'item_name_short'} ]), lastOptions: { params: {start: 0, limit: 6} }, data: ls_reqdata });
Code:dataset.loadData(ls_reqdata);
-
27 Jan 2009 10:54 PM #18Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
If you want to force repaging after adding records you should use:
Code:store.applyPaging(); store.fireEvent('datachanged', store);
-
28 Jan 2009 3:27 AM #19
Thank you, it's working now
Thank you, it's working now
Thank you pointing me to the right direction. Everything is working beautifully now

I have now changed the reader to be a XmlReader and use loadData() function as suggested to insert the records into the Store:
Code://'row' - repeating element in data XML //cols - the list of fields in array format dataset = new Ext.ux.data.PagingStore({ reader: new Ext.data.XmlReader( { record: 'row' }, cols ) }); //load records into store dataset.loadData(dataxml);
-
6 Feb 2009 7:39 AM #20


Reply With Quote
