View Full Version : a jsonstore bound to a gridpanel with some filters, paging is not showing correctly

12 Jun 2011, 6:27 AM

I have a Jsonstore which I bound to a Gridpanel, I also have a bottombar as PagingBar and also 4 filters.

Now, if I click on 1 filter and move around the pages everything works great (let us say, I am now in page 4 under filter A) but as soon as I click another filter B instead of showing the correct page result under filter B, it actually shows the last page I was on (the page 4 under filter A).

I can't think why this is happening. I have reload the store and refresh the paging bar.

If anyone here is familiar with this problem please help me. Thank you! :)

12 Jun 2011, 8:50 AM
Take a look at the requests sent to the server using Firebug or the Chrome Developer Tools. Check that the paging parameters and filters are being sent correctly. If they are, confirm that your server is returning the correct results given those parameters.

12 Jun 2011, 11:24 AM
Hi Skirtle,

Thank you for your suggestion. I tried checking the requests and responses and they are correct. However the display is still not correct.

After some fixes in my filter handler, currently if I move around between filters, as long as the other filters have more than 0 count then I would be fine. However if I move from filter A with 30 data into filter C with 0 data then when the page is load up I would see my last page(Filter A).

I don't understand why this happen only on filter with 0 count ? any suggestions are appreciated

Thank you

12 Jun 2011, 11:52 AM
So you're seeing a request going off to the server with 0 results coming back? Is that response definitely correct: returning an empty array of results rather than null or some other value? No error messages in Firebug or equivalent?

You'll need to post some code if you need more help, preferably a small but fully functional test case.