最近项目在使用Extjs的gridpanel,gridpanel采用的是分页形式展示,统计数据统计的是全表数据结果,不是当前分页的数据汇总,采用的网上方式在feature中采用remoteRoot : 'summary', 远程获取数据;如下:
features: [{
id: 'summary',
ftype: 'summary',
dock : 'bottom',
remoteRoot: 'summary'
}]
在store 请求数据的时候的配置
var store = Ext.create('Ext.data.Store', {
model: 'Task',
proxy: {
type: 'ajax',
url : 'summary-grid.json',
reader: {
type: 'json',
rootProperty: 'data'
}
},
sorters: {property: 'due', direction: 'ASC'},
autoLoad : true
});
请求的数据格式结果如下:
{
data : [
{projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 112, description: 'Integrate 2.0 Forms with 2.0 Layouts', estimate: 6, rate: 150, due:'06/24/2007'},
....
],
summary : {
description : 1200
}
}
数据展示结果如下:
这一切都还顺利,
问题现在出在,希望手动js修改summary的数据,并且展示在页面上,一直无法实现?各路大神有没有类似的需求经理