GridPanel Pagination Issue

  1. #1

    GridPanel Pagination Issue

    Hi,

    I'm facing some issues with Gridpanel pagetoolbar. Paging appears but no effect with GridPanel.

    I'm loading the store at client side using below code.

    var gridStore = new Ext.data.JsonStore({
                            idProperty: idProperty,
                            root: 'Records',
                            fields: fieldNames,
                            pageSize: 10
                        });
                        gridStore.loadData(dataset);
                        gridColumnModel = new Ext.grid.ColumnModel(columns);
    datasetGrid.reconfigure(gridStore, gridColumnModel);
    datasetGrid.syncSize();


    I'm creating the GridPanel Dynamically with an empty datastore using directMethods and assiging PagingToolbar into this.


    When my page loads, the Page toolbar appears but it has not populated as per my store.

    GridPanel gridDataset = new GridPanel();
                    gridDataset.ID = "grid";                              
    
                    
                    
                    Store gridStore = new Store();
                    gridStore.ID = "emptyStore";
                    
    
                    JsonReader gridStoreReader = new JsonReader();
                    gridStoreReader.Root = "Records";
                    gridStoreReader.IDProperty = "idProperty";
    
                    RecordField fieldNames = new RecordField();
                    fieldNames.Name = "fieldNames";
                    fieldNames.Mapping = "DisplayName";
                    gridStoreReader.Fields.Add(fieldNames);
                    gridStore.Reader.Add(gridStoreReader);
                    gridDataset.Store.Add(gridStore);
                    
                    PagingToolbar pageBar = new PagingToolbar();
    
                    pageBar.DisplayInfo = true;
                    pageBar.EmptyMsg = "No dataset values";
                    pageBar.DisplayMsg = "Displaying Values {0} - {1} of {2}";
                    pageBar.ID = "gridPage";
                    pageBar.StoreID = gridStore.ClientID;
                    pageBar.PageSize = 10;
    
                    gridDataset.BottomBar.Add(pageBar);
    Could anyone help me on this?
    Last edited by anulall; Aug 09, 2011 at 5:09 AM.
  2. #2
    Hi,

    Please wrap the code in [CODE ] tags, see:
    Forum Guidelines For Posting New Topics
  3. #3
    code has been wrapped..
  4. #4
    Please try to add respective "start" and "limit" baseParams for the Store.

Similar Threads

  1. Gridpanel Pagination problem.
    By Rupesh in forum 1.x Help
    Replies: 0
    Last Post: Apr 13, 2012, 12:17 PM
  2. Problem with pagination in Store
    By gfcmedia in forum 1.x Help
    Replies: 2
    Last Post: Aug 18, 2010, 3:48 PM
  3. Row expander with pagination
    By 78fede78 in forum 1.x Help
    Replies: 0
    Last Post: Jul 06, 2010, 3:56 PM
  4. Remote Pagination gridpanel pagetoolbar
    By 78fede78 in forum 1.x Help
    Replies: 0
    Last Post: Jun 29, 2010, 4:30 PM
  5. [CLOSED] pagination issue
    By alexp in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 20, 2009, 1:19 PM

Posting Permissions