ExtJS网格面板不显示页码

ExtJS网格面板不显示页码,extjs,grid,panel,paging,Extjs,Grid,Panel,Paging,我正在使用一个带有ASP.NETMVC的ExtJS分页网格面板。除了网格没有显示页码之外,一切似乎都很正常。它仅显示在底部工具栏页面空白处共3页 这是我的商店: Ext.define('EJ.store.Locations', { extend: 'Ext.data.Store', model: 'EJ.model.Location', autoLoad: { params: { start: 0,

我正在使用一个带有ASP.NETMVC的ExtJS分页网格面板。除了网格没有显示页码之外,一切似乎都很正常。它仅显示在底部工具栏页面空白处共3页

这是我的商店:

 Ext.define('EJ.store.Locations', {
     extend: 'Ext.data.Store',
     model: 'EJ.model.Location',
     autoLoad: {
         params: {
             start: 0,
             limit: 5
         }
     },
     pageSize: 5,
     remoteSort: true,
     proxy: {
         type: 'ajax',
         url: '/location/read',
         reader: {
             type: 'json',
             root: 'locations',
             totalProperty: 'totalLocations',
             successProperty: 'success'
         }
     }
 });
这是我的观点:

Ext.define('EJ.view.location.List', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.locationlist',
    store: 'Locations',
    title: 'All locations',
    autoScroll: true,

    columns: [{
        text: 'Location Id',
        flex: 1,
        sortable: true,
        dataIndex: 'LocationId'
    }, {
        text: 'Name',
        flex: 1,
        sortable: true,
        dataIndex: 'Name'
    }],
    bbar: Ext.create('Ext.PagingToolbar', {
        pageSize: 5,
        store: 'Locations',
        displayInfo: true,
        displayMsg: 'Displaying Locations {0} - {1} of {2}',
        emptyMsg: "No topics to display"

    }),
});

看起来您定义了一个存储和网格,并在
bbar
config中实例化了一个pagingtoolbar,他不知道某个存储,因为它尚未创建

尝试通过延迟加载添加它(也可以是bbar配置):

dockedItems: [{
    xtype: 'pagingtoolbar',
    dock: 'bottom',
    pageSize: 5, 
    store: 'Locations',   
    displayInfo: true,
    displayMsg: 'Displaying Locations {0} - {1} of {2}',
    emptyMsg: "No topics to display"
}],