As it has been 开发者_JAVA技巧said in title problem is that summary of last column doesn't work, here is the code:
,{
    id: 'result_id',
    header: " ",
    sortable: true,
    dataIndex: 'result',            
    width: 100,
    renderer: function (value, style, record, row, col, store, grid) {
      return Ext.util.Format.number(record.get('prew1') * record.get('prew2'), '0.00');
    },  
    summaryType: 'sum',
    summaryRenderer: function(v) {
        return  Ext.util.Format.number(v, '0.00');
    }  
So multyplication works as expected but sum always stay 0, any thoughts?
I tryed also to specify custom summaryType like this:
summaryType:function (values) {
    var result = [], retval;
    Ext.Array.forEach(values, function (record){
        result.push(record.get('area') * record.get('yield'));
    });       
    retval = Ext.Array.mean(result); 
    return Ext.util.Format.number(retval, '0.00');
},
But that couse a ExtJs problem Error:
Ext.ux.grid.GroupSummary.Calculations[cf.summaryType] is not a function Source File: /lib/ext/ux/GroupSummary.js Line: 124
Any ideas?
Thanks
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论