Results 1 to 8 of 8

Thread: help with paging in dynamic grid

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    86

    Default help with paging in dynamic grid

    hi all, I've got a problem with paging toolbar in my grid, when I run in the first time, I've got the pagination like a "01 - 010" instead of "1 - 10" and if I put next I've "101" instead of "2"
    can anybody help me

    here a cap, to explain better
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Posts
    86

    Default

    no answers??

  3. #3
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    707

    Default

    No code? (use [code/] tags)

  4. #4
    Sencha User
    Join Date
    Jul 2009
    Posts
    86

    Default

    well this a pagingtoolbar:
    Code:
        var paging =  new Ext.PagingToolbar({
            pageSize: PageSize,
            store: callsStore,
            displayInfo: true,
            refreshText:'',
            displayMsg: '{0} - {1} of {2}',
            emptyMsg: ''
        });
    and
    this is my grid

    Code:
        callsGrid = new Ext.grid.GridPanel({
            id: 'callsGrid',
    //        el: 'callsGrid',
            height: 400,
            width: 820,
            //autoWidth:true,
            frame: true,
            border: true,
            title: 'Bulletins',
            store: callsStore,
            colModel: colModel,
            bbar: paging
    })
    here is the store load

    Code:
    callsStore.load({params: {start:'0',limit:'10}});
    and well if and put next and later I put back, the paging is normal from "1-10 of 16"(displaying info) and in the text is "Page 1 of 2", and If I put again next appears "Page 2 of 2", so my problem is when for first time create the grid the paging is wrong, only when load the grid for first time

  5. #5

    Default

    Be certain (a) that you do specify the page-size, and (b) that your initial "Load" request specifies a chunk of records corresponding to one page.

    Subsequently, pay attention to "reload()" vs. "load()" so that you do not lose the start/limit settings and accidentally wind up requesting the world. I put them in "baseParams."

    Be sure that you do tests with large datasets just to be sure that nothing like this has slipped through.

  6. #6
    Sencha User
    Join Date
    Sep 2009
    Location
    Calgary, Alberta, Canada
    Posts
    638

    Lightbulb

    What does your store config look like?

    I agree with mike, you might want to specify your pageSize (very important).

    I am not sure if autoDestroy needs to be set to true.

    Your Server Response might be causing the problem.
    you need to return and specify them in the Reader a total count, root, and idProperty.

    I didn't do this, and my display went wonky.

  7. #7
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    707

    Default

    Did you try making start/limit numbers instead of strings?

  8. #8
    Sencha User
    Join Date
    Jul 2009
    Posts
    86

    Default

    yeah, carol that was the error, I shoulded put number no string or characters, sorry for my delayed answer:P

Posting Permissions

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