在使用extjs的grid分页时,若是再采用了列注脚,列注脚默认仅是当前页的,如下:
总共有8条数据,每页分为5行,采用行合计,希望显示的是总计8,结果却是第一页为5,第二页为3.
代码:
这里采用前端内存分页进行演示
{
xtype: 'grid',
id: 'grid',
store: {
autoLoad: false,
proxy: {
type: 'memory',
enablePaging: true,
},
pageSize: 5,
},
columns: [{
text: 'Title',
flex: 1,
dataIndex: 'title',
minWidth: 100,
summary:'sum'//注意!!这里是在columns里指明合计方式
}],
items: [{
xtype: 'toolbar',
docked: 'top',
items: [{
xtype: 'button',
text: 'set Data',
handler: functio