Hybrid View

  1. #1
    Sencha Developer
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    482
    Vote Rating
    1
    Wolfgang is on a distinguished road

      0  

    Default get/set PageSize for Ext.PagingToolbar?

    get/set PageSize for Ext.PagingToolbar?


    Although that can be done in the beforeload event etc, I think get/set methods for pageSize in PagingToolbar would be great to allow setting the pageSize dynamically.
    Alternativly, I also thought of pageSize being an "official" property.

    Regards

    Wolfgang

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    isn't pageSize already an official config?

    you can already do this currently
    Code:
    var paging = new Ext.PagingToolbar(gridFoot, ds, { // add a paging toolbar to the grid's footer
      pageSize: 20,
      displayInfo: true,
      displayMsg: 'Displaying Sequences {0} - {1} of {2}',
      emptyMsg: "No Sequences to display"
    });
    or am i missing something?

  3. #3
    Sencha Developer
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    482
    Vote Rating
    1
    Wolfgang is on a distinguished road

      0  

    Default


    Well i thought of get/set during _runtime_ do force a recalculating of the limit param.
    Example: i resize my grid and want to get onyl 7 records, instead of the default 20.
    Later i resize again and want 15 records instead of 7.

    When using the 'beforeload' event, i can pass params / baseParams like start / limit directly.
    But if i change pageSize, i would need to access at least one time the pagebar to let the pagebar recalculate the new value for limit or use a workaround like this:
    PHP Code:
    pageSize.on('change', function() {
                    
    pageBar.pageSize parseInt(pageSize.getValue());
                    
    ds.load({params: {start0limitpageBar.pageSize}});
                }); 
    So i thought of a method setPageSize(newValue) that would not only set pageSize but also adjust the value for limit for any new load request.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Posts
    20
    Vote Rating
    0
    lychorojostone is on a distinguished road

      0  

    Default


    I Had the same problem... did you solve it???
    Lisandro

  5. #5
    Sencha User
    Join Date
    Apr 2011
    Posts
    1
    Vote Rating
    0
    neketsushonen is on a distinguished road

      0  

    Default You should do this

    You should do this


    Hey Friend:

    I guess you should fire your event from "store", and not from "page".

    //this.getValue() => the page size you want

    store.load({params:{start:0, limit:this.getValue()}});
    Ext.getCmp("pagBarCliente").pageSize=this.getValue();

    After change the store from the grid, and you set pageSize, the panel will show you the correct count of pages.

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..." hd porno faketaxi