Results 1 to 3 of 3

Thread: Problems with component PagingToolbar

  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    39
    Answers
    1

    Default Problems with component PagingToolbar

    Hi all.

    I have some problem with paged data in a grid.
    Unfortunately I cannot send my code but I'll try to explain my problem. Thanks at all.

    I have a Grid in which I have inserted a paging toolbar (added using the bbar property of the grid).
    In this paging toolbar I have added a plugin (PageSizer): a combobox for change dinamically the pageSize property of the Store.
    Apparently, this work fine. On the pagingbar, the informations about the records change according to the value selected from the combo. For modify the records information I use this code:
    HTML Code:
    this.store.pageSize = <value_selected_from_combobox;
    Where "this" refer to the paging toolbar and "store" is the store associated.

    But if I check the request url made, the parameters "start" and "limit" are unmodified (start:0 and limit:25, the defaults value). I can see only a new parameter in the url request: the "page" parameter (number of the page).
    And this also if I change the page with the arrows in the paging toolbar.

    Some information:
    - the data and columns in the grid are dynamic
    - the Store have a default pageSize of value 25
    - the Store have the property autoDestroy to true

    Anyone have an idea to solve this annoing problem?

    Thanks again in advance,
    Lorenzo.

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai, India
    Posts
    92
    Answers
    8

    Default

    The easiest way is to set the start page your self.
    Code:
    this.store.start = (this.store.limit * (value_selected_from_combobox-1))+1;
    that will give you the start value of each page you choose from the combo box.

  3. #3
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    In API doc of Ext.toolbar.Paging:

    To use paging, you need to set a pageSize configuration on the Store, and pass the paging requirements to the server when the store is first loaded

    Code:
    store.load({
    
    params:{// specify params for the first page load if using paging        start:0,        limit: myPageSize,// other params        foo:'bar'}});

    ...
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

Similar Threads

  1. Problems in Ext.Extend for PagingToolbar in 3.0
    By N00be in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 27 Jul 2009, 8:22 AM
  2. Problems bbar:new Ext.PagingToolbar
    By David Martinez in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 15 Jul 2009, 1:06 PM
  3. problems with Ext.PagingToolbar
    By johny in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Nov 2008, 10:51 AM
  4. PagingToolbar problems
    By ksolberg in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 20 Sep 2008, 9:15 AM
  5. PagingToolbar problems
    By cuteleaf in forum Ext 2.x: Help & Discussion
    Replies: 16
    Last Post: 6 Nov 2007, 11:33 PM

Tags for this Thread

Posting Permissions

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