Results 1 to 3 of 3

Thread: Ext.PagingToolbar not paging

  1. #1
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192

    Default Ext.PagingToolbar not paging

    Hi guys

    I am using the Ext.PagingToolbar, its not paging, i am using it in conjunction with saki's drag drop grids which i have placed inside two panels one each.

    I know the json total meta is correct in firebug.

    I know my store has the total because i can see it throgh firebug.

    I have set the totals property in the json store i am using for its reader using the jsonstore all in one class

    anything else ?


    saki's bit moded
    Code:
            // hard coded config - cannot be changed from outside
            var config = {
                store:new Ext.data.JsonStore({
                    totalProperty: 'totalCount',
                    id: 'id',
                    url: '/irhtv/index/getmoviesforpackaging',
                    root: 'items',
                    autoLoad: true,
                    baseParams: {
                        package_id: m[0].data.id
                    },
                    fields: ['id', 'movie_type', 'order', 'name', 'source_type', 'url', 'desc', 
                    'img', 'price', 'year', 'actors', 'director', 'trailer_url', 'synopsis']
                })
            };
            
            // apply config
            Ext.apply(this, Ext.apply(this.initialConfig, config));
            
            // call parent
            Example.Grid1.superclass.initComponent.apply(this, arguments);
            
            } // eo function initComponent
            }); // eo extend
            
            // register xtype
            Ext.reg('examplegrid1', Example.Grid1);
            // }}}
            // {{{
            Example.Grid2 = Ext.extend(Example.Grid, {
            initComponent:function() {
            // hard coded config - cannot be changed from outside
            var config = {
                store:new Ext.data.JsonStore({
                    url: '/irhtv/index/getpackagemovies',
                    root: 'items',
                    totalProperty: 'totalCount',
                    autoLoad: true,
                    baseParams: {
                        package_id: m[0].data.id
                    },
                    id: 'ddgrid2store',
                    fields: ['id', 'movie_type', 'order', 'name', 'source_type', 'url', 'desc', 
                    'img', 'price', 'year', 'actors', 'director', 'trailer_url', 'synopsis']
                })
            };
            
            // apply
    my bits
    Code:
    items: [{
                                            xtype:'panel',
                                            bbar: new Ext.PagingToolbar({
                                                id: 'panel1bbar',
                                                pageSize: 5,
                                                displayInfo: 'Lines {0} - {1} of {2}',
                                                emptyMsg: 'No Lines to display',
                                                /* 
                                                    DUMMY STORE (this is the store of the main extphp page grid it is 
                                                    used as a dummy and replaced before window show)
                                                */
                                                store: store
                                            }),
                                            title: 'Available Movies',
                                            items: [{
                                                xtype: 'toolbar',
                                                id: 'panel1tbar'
                                            },{
                                                xtype:'examplegrid1',
                                                id: 'grid1',
                                                height: 200,
                                            }]
                                        },{
                                            xtype:'panel',
                                            title: 'Movies In This Package (Save changes after midification)',
                                            items: [{
                                                xtype: 'toolbar',
                                                items: [{
                                                }]
                                            },{
                                                xtype:'examplegrid2',
                                                id: 'grid2',
                                                height: 200
                                            }]
                                        }]
                                    }
    
    ......
    
    
    Ext.getCmp('panel1bbar').store = Ext.getCmp('grid1').getStore();
                        
                        updateMovieWindow.show();

    thanks !!!

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    look at the paging example in the SDK. you'll see that you need to load the manually once, and set autoLoad to false.

  3. #3
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192

    Default

    i figured it out eventualy, what was hapening was that i used that dummy store wich kinda conected it for good, i figured this as the total in my grid was good but the reload of the 3rd base grid on another area made this one relaodd, now i externaly insert the toolbar after the definition of the above window by extracting the store from the grid.

    tnx

Posting Permissions

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