1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    66
    Vote Rating
    0
    shr1975 is on a distinguished road

      0  

    Default Next, previous, first, last fetching same set of data in Paging Grid.

    Next, previous, first, last fetching same set of data in Paging Grid.


    Hi,

    I have implemented a Paging Grid. My proxy fetches the data correctly for the first time. But when I click on the navigation links ('first', 'next' etc.), it still displays the contents of the first page. What could be wrong?


    Thanks.

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750
    Vote Rating
    9
    fay will become famous soon enough fay will become famous soon enough

      0  

    Default


    Are you implementing the logic for getting the first/previous/next/last set of records in your server-side SQL?

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,905
    Vote Rating
    626
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Post your code, will be easier to help.

  4. #4
    Ext User
    Join Date
    Oct 2007
    Posts
    66
    Vote Rating
    0
    shr1975 is on a distinguished road

      0  

    Default


    Thanks everybody. I have been able to do it.

    The server-side had the code for paging, but I was not triggering the event from the Grid.

  5. #5
    Ext User
    Join Date
    Oct 2007
    Posts
    10
    Vote Rating
    0
    saipradeep is on a distinguished road

      0  

    Default


    hi,

    i am also faceing the same problem can u please post the code to solve this problem!!!

    thanks.

  6. #6
    Ext User
    Join Date
    Oct 2007
    Posts
    66
    Vote Rating
    0
    shr1975 is on a distinguished road

      0  

    Default


    This does not have a common solution. The way it works for us is that our backend calls different methods depending the value of the 'event' parameter. Therefore we pass this parameter to the backend in the beforeload event of the datasource like this:
    ds.on('beforeload', function (ds, opts)
    {
    if ((ds.getCount() > 0))
    {
    opts.params.event='goto' ;
    }
    }

    For this to work for you, you will have to check what parameters your backend expects for paging to work and then pass those in the above event.

Thread Participants: 3