-
5 Aug 2009 11:11 PM #31
I already put your feature request into PagingStore. It runs fine.
-
21 Sep 2009 12:14 PM #32
Wondering if some functionalities are available or not...
Wondering if some functionalities are available or not...
Hello,
I have some questions concerning the Paging Store whereas if some functionalities are available or not :
1 - Can it remember the states (cookie) - I.e the last page the user was on...? It also seems like if I put a filter in, it won't remember it ... is it normal? It does remember it when i dont use the PagingStore.
2 - When I filter the data, is it suppose to update the paginator's total pages accordingly? I need to hit refresh button in order to update the data - did i missed something?
3 - Also if i'm located on page 3 of 5 and I filter some data that only has few records (1 page), it leaves me on the 3rd page. Should it redirect me automatically on the 1st page?
4 - Using a PagingGroupingStore, if I select a header and click group by this field, i get an error of : "this.applyGroupField is not a function". If i click again, i get no errors, but it doesn't group by this field until I hit the refresh button of the paginator - Is it the same refresh problem of the filters?
Overall, I'm really impressed by this feature, it saves a lot of coding time - Many thanks!!!!!!
-
24 Sep 2009 7:56 AM #33
For point 2 :
I added
andCode:myGrid.on({ filterupdate: this.updatePaginator, afterrender: this.updatePaginator });
Dont know if its the right way to do it, but that way it will call the update of the paginator after the filter was done, updating the records count and the page...Code:updatePaginator: function() { // Used to update the paginator after the grid is loaded or filtered (if filters were still selected, normally it wont update the paginators values) var updatePaginator = new Ext.util.DelayedTask(function() { Ext.getCmp("myPagingToolBar").doLoad(0); }); updatePaginator.delay(500); },
For point 3 :
Code:var myBottomBar = new Ext.PagingToolbar({ // Optional id: 'myPagingToolBar', store: myStore, plugins: [myFilters] });
For point 4 :
fixed my problemCode:Ext.ux.data.PagingGroupingStore = Ext.extend(Ext.ux.data.PagingStore, { remoteGroup: Ext.data.GroupingStore.prototype.remoteGroup, groupOnSort: Ext.data.GroupingStore.prototype.groupOnSort, clearGrouping: Ext.data.GroupingStore.prototype.clearGrouping, groupBy: Ext.data.GroupingStore.prototype.groupBy, applyGroupField: Ext.data.GroupingStore.prototype.applyGroupField, applySort: Ext.data.GroupingStore.prototype.applySort, applyGrouping: Ext.data.GroupingStore.prototype.applyGrouping, getGroupState: Ext.data.GroupingStore.prototype.getGroupState });
-
28 Sep 2009 2:08 AM #34
Hi all
Use code:
My English is not good(PHP Code:var store = new Ext.ux.data.PagingArrayStore({
fields:[...],
url:'data.backend.php',
root:'rows',
totalProperty:'totalCount',
autoLoad:{params: {start: 0, limit: "set totalCount"}}
});
How to get json response "totalCount" and set to parameter limit?
Json response:
PHP Code:{"totalCount":2,"rows":[{...},{...},{...}]}
-
28 Sep 2009 2:39 AM #35
-
28 Sep 2009 3:09 AM #36
In my application I have a function that allows user to skip through the rows of data by pressing "next" button. Right now every time when the user presses the button it fires a request that queries the database and fetches the next bit of data, which works fine but with some delays. So the solution that I want to implement is to fetch quite a considerable amount of data into array in one go and then feed it to user bit by bit when requested, this way the response time of the web site will be almost instant. Also I want to write a function that would wach the position of the pointer in this array and fetch more data from the database when it gets close to the end of the array.
-
28 Sep 2009 3:43 AM #37Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Yes, there are more people asking for this...
PagingStore isn't capable of doing this, so it would require extra coding on your part (you need to add the extra loaded data to the internal allData MixedCollection).
-
28 Sep 2009 3:53 AM #38
Im do it
PHP Code:var request = new Ext.data.JsonStore({
id:'getCount',
root:'totalCount',
url:'getCount.php',
fields:[{name:'total'}]
});
request.load();
request.on('load', function(request, record, options){
var store = new Ext.ux.data.PagingArrayStore({
fields:[...],
url:'data.backend.php',
root:'rows',
totalProperty:'totalCount',
autoLoad:{params: {start: 0, limit: request.totalLength}}
});
var pageToolBar = new Ext.PagingToolbar({
pageSize: request.totalLength,
store: store
});
...........
-
29 Sep 2009 11:52 AM #39
Very very big thanks
Very very big thanks
Hello Condor,
just wanted to say thanks a real real real big bunch, for once more saving my Ass,
this time without even knowing it. Your Store is working like a Champ!
-
4 Oct 2009 9:37 AM #40
Adding my thanks
Adding my thanks
Condor,
Just want to add my thanks to the rest for this extension. Really saved me a lot of time and grief. Nice job!


Reply With Quote