1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Florianópolis/SC/Brazil
    Posts
    7
    Vote Rating
    0
    cenoura is on a distinguished road

      0  

    Default Page Number x Load store with new param

    Page Number x Load store with new param


    Hi,

    I have an Ext.grid.Panel with pagingtoolbar.
    I've set my store pageSize to 20 and there are 50 items in my database.

    If i go to the second page, set some params in extraParams and load the store, i get items from second page, but i've set some new params, so i want to see the items from the begin (first page).

    How can i do that? I've used loadPage(1), but it doesn't seem to be the most correct.
    Why ExtJS doesn't set page number to 1 automatically?

    sorry for my bad english.

    Thank you!

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Are you wanting to load a specific page in code? I am not sure I understand your request.

    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    Florianópolis/SC/Brazil
    Posts
    7
    Vote Rating
    0
    cenoura is on a distinguished road

      0  

    Default


    i want to always load the first page.
    Anyway, I would like to know why ExtJS keeps passing the page parameter equal 2, even though I set new parameters to search what i want on my database.

    When you're doing a search, you want to see the results starting from page 1, right? but ExtJS doesn't set page = 1 when i add new params.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you show your code?

    If I call grid.store.loadPage(1), I then get that page:

    -Loaded grid data
    -Selected Page 2
    -Clicked button to filter data and select page 1

    Code:
    page:1
    start:0
    limit:33
    sort:[{"property":"id_request","direction":"DESC"}]
    Regards,
    Scott.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Location
    Florianópolis/SC/Brazil
    Posts
    7
    Vote Rating
    0
    cenoura is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Can you show your code?

    If I call grid.store.loadPage(1), I then get that page:

    -Loaded grid data
    -Selected Page 2
    -Clicked button to filter data and select page 1

    Code:
    page:1
    start:0
    limit:33
    sort:[{"property":"id_request","direction":"DESC"}]
    Regards,
    Scott.
    Hi Scott,

    I've tried this. It works. But my question is: is this the right way to do this?
    Why the framework doesn't "reset" the page value when i set new params on extraParams?

    Regards,
    Cenoura

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    It is not taken for granted you want this behavior. It is your responsibility to perform this action.

    Regards,
    Scott.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi