Hybrid View
-
31 Jan 2013 5:19 AM #1
Unanswered: Grid, current page and new totalRecords
Unanswered: Grid, current page and new totalRecords
Hello,
I have some problem with paging at grid with remote filtering.
Grid has 1000 records.
Page size is 100.
User moves to page number 2.
User applies some external (not grid member) filter.
User press refresh button at paging bar.
Store applies filter data by code
Server-side script build new query and generate response with 56 records.PHP Code:listeners:{ beforeLoad: function (store){
store.getProxy().extraParams.query = Ext.ComponentManager.get("vendorfilter").value;
}}
But page is 2, There is no page 2 now!
Well, server can send empty page or last page.
If server send empty recordset, paging bar is disabled.
If server send last page, paging bar looks funny
"page 7 from 1" and "Displaying 101-56 of 56"
-
4 Feb 2013 9:11 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
- Answers
- 3107
You can use loadPage method on the store to specify to go to page 1
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
4 Feb 2013 8:51 PM #3
You are right.
I have solved this problem by event.
But I guess store (or/and grid or/and paging panel) should to know about new totalRecords from last package.
Thank you.
Evgeny


Reply With Quote