1. #1
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    87
    Vote Rating
    3
    alejandroNNU is on a distinguished road

      0  

    Default Paging Toolbar Help

    Paging Toolbar Help


    Hey all,

    This is my first time trying to incorporate paging for my grid panel, so I dragged a Paging Toolbar into the grid panel which automatically docked onto the bottom. First I tried 'linking' it with a dummy JSON store that simply retrieves records from a local .json file and the toolbar works fine:

    jsonStore.PNG

    but then I tried using it with an XML store which is what I really need it for, and for some reason it just doesn't work, the grid populates just fine but the toolbar apparently detects no records:

    xmlStore.PNG

    everything is the same, the only thing I change is the store that the grid and the toolbar use, and the grid populates just fine, so why doesn't the toolbar detect anything?

    It was mentioned in another thread that the 'totalProperty' of the XmlReader needs to be specified in the response you get back from the server, however right now this is not possible for me, I can't get the server response to include the total property. But anyways, why would it work with the JSON store then? I didn't specify any totalProperty there either, it's just set the default of 'total'. And if the grid detects and populates with the records just fine, shouldn't the toolbar work too? So can someone please help me figure out why the toolbar isn't working for the XML store? I've been trying to figure this out for almost 2 days now and I just don't understand whats wrong, any help would be greatly appreciated.

    This is the XML store:
    Code:
    Ext.define('MyApp.store.LocationStore', {
        extend: 'Ext.data.Store',
    
    
        requires: [
            'MyApp.model.LocationModel'
        ],
    
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                model: 'MyApp.model.LocationModel',
                storeId: 'MyXmlStore',
                groupField: 'status',
                proxy: {
                    type: 'ajax',
                    reader: {
                        type: 'xml',
                        record: 'row'
                    }
                }
            }, cfg)]);
        }
    });
    This is the panel with the grid and the toolbar:
    Code:
    Ext.define('MyApp.view.MyPanel', {
        extend: 'Ext.panel.Panel',
    
    
        height: 430,
        itemId: 'mainPanel',
        width: 457,
        layout: {
            type: 'absolute'
        },
        title: 'Service List',
    
    
        initComponent: function() {
            var me = this;
    
    
            Ext.applyIf(me, {
                items: [
                    {
                        xtype: 'gridpanel',
                        height: 320,
                        itemId: 'serviceGrid',
                        width: 460,
                        header: false,
                        title: 'My Grid Panel',
                        scroll: 'vertical',
                        store: 'LocationStore',
                        viewConfig: {
                            itemId: 'MyGridView'
                        },
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                width: 210,
                                dataIndex: 'sysid',
                                text: 'SysID'
                            },
                            {
                                xtype: 'gridcolumn',
                                width: 245,
                                dataIndex: 'status',
                                text: 'Status'
                            }
                        ]
                    },
                    {
                        xtype: 'textfield',
                        x: 0,
                        y: 320,
                        height: 23,
                        itemId: 'searchBox',
                        width: 460
                    },
                    {
                        xtype: 'button',
                        x: 180,
                        y: 350,
                        itemId: 'searchButton',
                        text: 'Search'
                    }
                ],
                dockedItems: [
                    {
                        xtype: 'pagingtoolbar',
                        x: 301,
                        y: -15,
                        dock: 'bottom',
                        itemId: 'pagingToolbar',
                        width: 360,
                        displayInfo: true,
                        store: 'LocationStore'
                    }
                ]
            });
    
    
            me.callParent(arguments);
        }
    
    
    });

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    87
    Vote Rating
    3
    alejandroNNU is on a distinguished road

      0  

    Default


    Can someone please help me with this? Do I need to start posting questions in the Architect 3 forums now? or are these ones still pretty active?

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