У меня есть json
результаты, которые выглядят так:
JSON
{
"type": "rpc",
"tid": 1,
"action": "TestAction",
"method": "GetRowsList",
"result": {
"total": 52,
"data": [{
"title": "3m Co",
"num1": 71.72,
"num2": 0.02,
"num3": 0.03,
"ts": "9\/1 12:00am"
},
{
"title": "Alcoa Inc",
"num1": 29.01,
"num2": 0.42,
"num3": 1.47,
"ts": "9\/1 12:00am"
}, {
"title": "Altria Group Inc",
"num1": 83.81,
"num2": 0.28,
"num3": 0.34,
"ts": "9\/1 12:00am"
}, {
"title": "American Express Company",
"num1": 52.55,
"num2": 0.01,
"num3": 0.02,
"ts": "9\/1 12:00am"
},
]
}
}
Имеют этот код вида сетки:
{
xtype: 'gridpanel',
title: 'Users Site Mangment',
store: 'MyJsonStore2',
pageSize: 10,
frame: true,
viewConfig: {
autoFill: true
},
columns: [{
xtype: 'gridcolumn',
dataIndex: 'title',
text: 'User Name'
}, {
xtype: 'gridcolumn',
dataIndex: 'num1',
text: 'Email'
}, {
xtype: 'gridcolumn',
dataIndex: 'num2',
text: 'Email3'
}, {
xtype: 'gridcolumn',
dataIndex: 'num3',
text: 'Last Login'
}, {
xtype: 'gridcolumn',
dataIndex: 'ts',
text: 'Register Date'
}, {
xtype: 'actioncolumn',
width: 246,
items: [{
}, {
}]
}],
selModel: Ext.create('Ext.selection.CheckboxModel', {
}),
bbar: {
xtype: 'pagingtoolbar',
width: 360,
displayInfo: true,
store: 'MyJsonStore2',
dock: 'bottom'
}
}
Магазин
Ext.define('MyApp.store.MyJsonStore2', {
extend: 'Ext.data.DirectStore',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'MyJsonStore2',
fields: [{
name: 'title',
type: 'string'
}, {
name: 'num1',
type: 'string'
}, {
name: 'num2',
type: 'string'
}, {
name: 'num3',
type: 'string'
}, {
name: 'ts',
type: 'string'
}],
root: 'data',
totalProperty: 'total',
autoLoad: true,
directFn: SystemBO.TestAction.GetRowsList
}, cfg)]);
}
});
Какой странный пейджер работает!но отображать пустую сетку, почему?