1. #1
    Sencha User evgenspb's Avatar
    Join Date
    Jun 2010
    Location
    Russia Saint-Petersburg
    Posts
    34
    Vote Rating
    1
    evgenspb is on a distinguished road

      0  

    Default 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
    PHP Code:
    listeners:{    beforeLoad: function (store){            
    store.getProxy().extraParams.query Ext.ComponentManager.get("vendorfilter").value;   
     }} 
    Server-side script build new query and generate response with 56 records.
    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"

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,074
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can use loadPage method on the store to specify to go to page 1
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User evgenspb's Avatar
    Join Date
    Jun 2010
    Location
    Russia Saint-Petersburg
    Posts
    34
    Vote Rating
    1
    evgenspb is on a distinguished road

      0  

    Default


    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

Thread Participants: 1

Tags for this Thread