重写summaryType,返回的结果就总额
1 {
2 xtype: 'numbercolumn',
3 dataIndex: 'LEFTAMOUNT',
4 text: '剩余额度',
5 summaryType: 'sum',
6 format: '0,000.00',
7 align: 'right',
8 width: 120,
9 summaryType: function (a) {
10 var records = a;
11 var s, num = 0;
12 Ext.Array.each(records, function (record) {
13 var s = record.get("ISLOCK");
14 if (s == false) {
15 num += Number(record.get('LEFTAMOUNT'));
16 }
17 });
18 return num;
19 },
20 summaryRenderer: function (value) {
21 return "总计: " + Ext.util.Format.number(value, '0,000.00');
22 }
23 }
你说的是对的