2 Jan 2014 2:11 AM #11
Thanks for your early reply. It worked. But still facing problem with paging number updated in paging toolbar when filter applied.
2 Jan 2014 9:17 PM #12
https://fiddle.sencha.com/#fiddle/18p or your reference. Try to filter with the name "Lisa", you will see only one record but the pagination toolbar still shows 1 of 2. If you click on Refresh button then the pagination tool bar refreshes to 1 of 1.
We have tried to keep the load() function in filterBy method. but it goes to infinite loop as it call that again also the refresh button is disabled. Please provide your comments.
2 Jan 2014 9:37 PM #13
We have used the same logic that you have provided. Added applyPaging() in filterBy() method. The problem is solved with showing the number of records per page. But we are facing the issue with not refreshing the paging toolbar count.
Please check the fiddle https://fiddle.sencha.com/#fiddle/18p for your reference. Try to filter with the name "Lisa", you will see only one record but the pagination toolbar still shows 1 of 2. If you click on Refresh button then the pagination tool bar refreshes to 1 of 1.
We have tried to keep the load() function in filterBy method. but it goes to infinite loop. Please provide your comments.
5 Jan 2014 5:58 PM #14
My solution to this is to call the pager's moveFirst() method every time when clicking on a filter, as well as when new data get loaded. In this way, the figures in the pager will refresh.
6 Jan 2014 10:35 AM #15
I updated the code in the github repository to add the applyPaging to the filterBy method.
I didn't see the second issue you described. I updated my unit tests to call filterBy and moved to the second page, and the set of data on page was the records I expected, based on the sorting. If you have an example I can try and look at it further.
Thanks for the detailed feedback though. Greatly appreciated!
6 Jan 2014 6:02 PM #16
Thanks @aghextjs. I'm not sure whether the second issue happens to everyone actually. Although I hope it happens only to me, if anyone else has the same, hopefully my words will give him/her a clue.
PLUS: Not sure if you have tried with sorting on filtered data. That may do the trick.
7 Jan 2014 5:05 AM #17
Thanks a lot aghextjs and elvisharcher for helping in resolving the issue. And regarding the paging toolbar update, I have used the "filterupdate" event listener of grid to refresh the paging toolbar. I have placed the paging toolbar moveFirst in that listener and the problem got solved.
7 Jan 2014 5:16 AM #18
Thanks aghextjs and elvisharcher for your time in making me to understand the problems. Seriously it saved lot of my time.
7 Jan 2014 5:31 AM #19
31 Jan 2014 1:39 AM #20
Ext js 4.2 doen't provides filterupdate event on grid, and on the other hand call to doRefresh() and moveFirst and causing issues when implmeneted using filterchange event , somthing is hinding the text box filter implmented with the reference of custome grid filter i.e. FeatureFilter code.