You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Sep 2010
    Vote Rating
    ExTriqui is on a distinguished road


    Default AbstractSummary fixes

    AbstractSummary fixes

    Hi. There are a couple of things I don't like about AbstractSummary, If you agree with me maybe we could easlily fix them.

    Version 4.1

    1. getColumnValue. I think the check for undefined values should be moved after the renderer has been called.
        getColumnValue: function(column, summaryData){
            var comp     = Ext.getCmp(,
                value    = summaryData[column.dataIndex],
                renderer = comp.summaryRenderer;
            if (renderer) {
                value =
                    comp.scope || this,
            if (!value && value !== 0) {
                value = '\u00a0';
            return value;
    2. getSummary. I would like to receive the dataIndex (or field) when my custom aggregation function are being called. To do this we only need to pass the field to the aggregate function in Store, this is the same behavior followed in Store when it calls its aggregate function.
        getSummary: function(store, type, field, group){
            if (type) {
                if (Ext.isFunction(type)) {
                    return store.aggregate(type, null, group, [field]);
                switch (type) {
                    case 'count':
                        return store.count(group);
                    case 'min':
                        return store.min(field, group);
                    case 'max':
                        return store.max(field, group);
                    case 'sum':
                        return store.sum(field, group);
                    case 'average':
                        return store.average(field, group);
                        return group ? {} : '';
    Please, let me know what you think.
    Thank you very much.

    I have another proposal to modify the Summary class, using the method prepareData from Ext-grid-header-Container instead of that getPrintData, that forces you to use a differente renderer for the summary cells and doesn't allow to modify the metadata, but I think I will open another bug when I have a working solution.
    Last edited by ExTriqui; 19 Jun 2012 at 2:55 AM. Reason: Code formatting

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Vote Rating
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all



    Thanks for the report - your suggestions are great and we've implemented them for the next release!

    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

Thread Participants: 1

Tags for this Thread