1. #11
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    That is becuase your XML server handler needs to only return the correct number of records - ie if you set the page size to 20 then the store will request 20 records, but if you return 50 it will show 50. The server must obey the request (in terms of index offset and pagesize).

  2. #12
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    So, how to tell server to return specific data? How to add addition parameters each time page load? To pass offset value and pagesize value. Right now, I reconfigure proxy reader each time I need to load data from server so I can change url each time to get data. So, I can add additional parameters manually. eg: http://myserver/getData?pg=3&psize=20 will return records for page 3. I can't simply get specific records if I use loader(0,20).

  3. #13
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Look at demos... http://extjs.com/examples/grid/paging.html and http://extjs.com/examples/grid/xml.html

    Combine both examples - also the HttpProxy will add generated params with &start= &limit= in the url. Look into the source code and it explains how it works...

    Cheers,
    Grant

  4. #14
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    Yes, I did. But I have reconfigure builder so my server side can return correct xml data. May I know how to tell server side which records should be displayed. Currently, my server side will query database base on parameters given. eg. when pg=3, psize=20 it will SELECT * FROM table LIMIT 61, 80. Please guide me. Thanks.

    edit: Still go through the samples code

  5. #15
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    May I know is it when call 'loader(0, 20)' will pass start=0&limit=20? or I need to add it manually.

  6. #16
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Quote Originally Posted by helmishariff View Post
    May I know is it when call 'loader(0, 20)' will pass start=0&limit=20? or I need to add it manually.
    yes, when loader is told 0,20 it will add the url params start=0&limit=20

  7. #17
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    Thanks. great info for me. Another question, right now, I will load each time when user click next, previous etc button on paging toolbar. I use override so I can trigger to load different records. Are there any better method? or let say I have set loader(0,20) is it the loader automatically call loader(21, 40) when I click next button?

  8. #18
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    yup - just use the standard paging toolbar, it will call the loader correctly etc... no need to call load yourself

  9. #19
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    Ok, it's working. Sorry, another one. How to set number of pages. If pagesize = 20, load(0,20), it will show only 1 page. Actually, there are more records, more than 20. Right now I manually set the totalLength value.

    May I know what parameter send when we click header for remote sorting?

  10. #20
    Ext User
    Join Date
    Dec 2008
    Posts
    22
    Vote Rating
    0
    helmishariff is on a distinguished road

      0  

    Default


    found it. sortField

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar