Results 1 to 4 of 4

Thread: a jsonstore bound to a gridpanel with some filters, paging is not showing correctly

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    2

    Default a jsonstore bound to a gridpanel with some filters, paging is not showing correctly

    Hello,

    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!

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791

    Default

    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.

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    2

    Default

    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

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •