1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    19
    Vote Rating
    0
    Ashiro is on a distinguished road

      0  

    Question Editor Grid - Paging Shows All Records

    Editor Grid - Paging Shows All Records


    I've read post after post and tried to follow the examples to the letter (Tutorial, Docs, forum) but I'm banging my head against the wall with paging the editor grid. I've managed filtering, adding rows, editing in line but paging is killing me so I'd be eternally grateful for some help.

    Preliminary question: Is the paging done server-side with the offset and limit passed back to the server going into say a SQL query's limits or is it done client side with the whole dataset?

    I've tried doing it both ways:

    1. Server Side
    I tried using the "start" and "limit" post data in my SQL query on the server which then returned 10 records as expected. I then did a query to find the total number of fields in the table which in my case was 16. So my JSON returned:

    Code:
    ({"total":"16",plans:[{"planid":"1","lenderid":"3","lendername":"EPF","loantype":"1",[...]
    However, the grid displayed just the 10 records and said only 10 were available. So no paging.

    Then I tried....

    2. Client Side
    I ignore the "start" and "offset" values sent back as post data and simply send all records to the grid. Now I have something more promising because the grid detects all 16 records and that it should be put across 2 pages as it enables the paging button and shows "1 - 2" for the pages. However, it shows all the records - so its not paged. If I go to page 2 it just shows them all again.

    So neither way works - I'm hoping someone could let me know what I'm doing wrong? If you need to see my code then let me know what part and I'll post it up - I just don't want to swamp you all with it in one go.

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    pagins is handled on the server side; the idea is to reduce the amount of data exchanged with the client.
    it would help to see the config for your store and reader objects, particularly the reader's totalProperty property.

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    19
    Vote Rating
    0
    Ashiro is on a distinguished road

      0  

    Default


    Quote Originally Posted by devnull View Post
    pagins is handled on the server side; the idea is to reduce the amount of data exchanged with the client.
    it would help to see the config for your store and reader objects, particularly the reader's totalProperty property.
    You're an absolute star - thank you so much!

    I'd completely omitted the total property - something that had me running in circles chasing mirages here and there. Added that and its now working perfectly. Thanks again - you've been a great help.

  4. #4
    Ext User
    Join Date
    Dec 2007
    Location
    Italy
    Posts
    32
    Vote Rating
    0
    Emachan is on a distinguished road

      0  

    Default


    Hi to you all!!

    I am facing the same problem, I have a grid full of data.
    Let's say, 10 columns and almost 600 lines (records), but these ones are going to grow.

    I want to paginate my grid with 20 records per time, but I am not able to setup Ext.PagingToolbar properly.
    I mean, I took it form Extjs example, and it is:
    PHP Code:
        var paging = new Ext.PagingToolbar({
                
    storemodelStore,
                
    pageSize20,
                
    displayInfotrue,
                
    emptyMsg"No topics to display"
        
    }); 
    My store is set this way:
    PHP Code:
    var modelStore = new Ext.data.Store({
            
            
    storeId'myStore',
            
    proxy: new Ext.data.HttpProxy({
                
    url'models.php'
            
    }),
            
            
    reader: new Ext.data.JsonReader({
                
                
    root:         'models',
                
    totalProperty'count',
                
                
    fields:     [{name'model_id'},

                            .......

                            ]
                
            }),
        
            
    remoteSortfalse
        
    }); 
    Everything is loaded correctly, and the PagingToolbar shows a correct number of pages.
    But real data are not paged!!
    I see the same whole data every time.

    I didn't understand how should server interact with paging.

    Could you possibly help me?

    Thank you very much.

    EMA
    Make it happen...

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    In addition to the other sources you looked at, you can consider looking at the FAQ in my signature on grids (it's stickied in the forums as well).

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..."