You found a bug! We've classified it as EXTJS-16039 . 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
    Oct 2011
    Location
    Cincinnati, Ohio
    Posts
    9
    Vote Rating
    2
    charCo is on a distinguished road

      0  

    Default 4.2.3 Grid Grouping Summary alignment issue when using Row Expander

    4.2.3 Grid Grouping Summary alignment issue when using Row Expander


    In 4.2.2 using the Grouping Summary feature and Row Expander plugin together worked as expected and a group's summary values lined up with the related columns. In 4.2.3 this has broken causing the summary row columns to all become equal spacing and therefore out of alignment with columns that have been sized another way. Using this example, it is easy to see the alignment issue. Any suggestions?

    Code:
    Ext.define('TestResult', {
        extend: 'Ext.data.Model',
        fields: ['student', 'subject', {
            name: 'grade',
            type: 'int'
        }]
    });
     
    Ext.create('Ext.grid.Panel', {
        width: 400,
        height: 240,
        renderTo: document.body,
        features: [{
            groupHeaderTpl: 'Subject: {name}',
            ftype: 'groupingsummary'
        }],
        plugins: [{
            ptype: 'rowexpander',
            rowBodyTpl: [
            '<div class="row-details-panel" id="row-details-panel-{id}">{id}</div>'
            ]
        }],
        store: {
            model: 'TestResult',
            groupField: 'subject',
            data: [{
                student: 'Student 1',
                subject: 'Math',
                grade: 84
            },{
                student: 'Student 1',
                subject: 'Science',
                grade: 72
            },{
                student: 'Student 2',
                subject: 'Math',
                grade: 96
            },{
                student: 'Student 2',
                subject: 'Science',
                grade: 68
            }]
        },
        columns: [{
            dataIndex: 'student',
            flex: 1,
            text: 'Name',
            summaryType: 'count',
            summaryRenderer: function(value){
                return Ext.String.format('{0} student{1}', value, value !== 1 ? 's' : '');
            }
        }, {
            dataIndex: 'grade',
            flex: 1,
            text: 'Grade',
            summaryType: 'average'
        }]
    });

  2. #2
    Sencha User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    775
    Vote Rating
    32
    lumberjack has a spectacular aura about lumberjack has a spectacular aura about

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    10
    Vote Rating
    0
    somuchh8 is on a distinguished road

      0  

    Default


    Is there any update on a fix for this issue or possible work around?

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Cincinnati, Ohio
    Posts
    9
    Vote Rating
    2
    charCo is on a distinguished road

      0  

    Default


    I ended up adding an override to RowWrap.js. This pushed back in the column sizing to handle this case when its used in GroupingSummary.


    Code:
    Ext.define('overrides.RowWrap', {
        override : 'Ext.grid.feature.RowWrap',
        init: function(grid) {
            view.renderRowWrapColumnSizer = me.view.renderColumnSizer;
            view.renderColumnSizer = me.view.renderColumnSizer; //Edited this line to stop setting this as an emptyFn
        }
    });

Thread Participants: 2

Tags for this Thread