Hybrid View

    You found a bug! We've classified it as EXTJS-9524 . 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
    Apr 2011
    Posts
    15
    Vote Rating
    2
    navr84 is on a distinguished road

      0  

    Default Summary feature enables sort on action column

    When a grid panel with ftype summary is created, actioncolumn is sortable by default.

    *EDIT BY SLEMMON
    Tested on 4.2.0.663
    Tested on 4.2.1.760

    Code:
    Ext.define('TestResult', {
        extend: 'Ext.data.Model',
        fields: ['student', {
            name: 'mark',
            type: 'int'
        }]
    });
    
    
    Ext.create('Ext.grid.Panel', {
        width: 400,
        height: 200,
        title: 'Summary Test',
        style: 'padding: 20px',
        renderTo: document.body,
        /*features: [{
            ftype: 'summary'
        }],*/
        store: {
            model: 'TestResult',
            data: [{
                student: 'Student 1',
                mark: 84
            },{
                student: 'Student 2',
                mark: 72
            },{
                student: 'Student 3',
                mark: 96
            },{
                student: 'Student 4',
                mark: 68
            }]
        },
        columns: [{
            dataIndex: 'student',
            text: 'Name',
            summaryType: 'count',
            summaryRenderer: function(value, summaryData, dataIndex) {
                return Ext.String.format('{0} student{1}', value, value !== 1 ? 's' : ''); 
            }
        }, {
            dataIndex: 'mark',
            text: 'Mark',
            summaryType: 'average'
        }, {
            xtype:'actioncolumn',
            width:50,
            items: [{
                icon: 'extjs/examples/shared/icons/fam/cog_edit.png',  // Use a URL in the icon config
                tooltip: 'Edit',
                handler: function(grid, rowIndex, colIndex) {
                    var rec = grid.getStore().getAt(rowIndex);
                    alert("Edit " + rec.get('firstname'));
                }
            }]
        }]
    });
    Last edited by slemmon; 17 Apr 2013 at 3:22 PM. Reason: added inline test case and versions tested on

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,120
    Vote Rating
    227
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default

    Do you mean in ExtJS 4.2.1 Beta (744)?

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    15
    Vote Rating
    2
    navr84 is on a distinguished road

      0  

    Default

    I am facing the issue in extjs 4.2.0.663

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,120
    Vote Rating
    227
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default

    I see. I'll move the thread from 4.x Beta (reserved for Beta build questions/issues only) to the Ext: Q&A forum.

  5. #5
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,120
    Vote Rating
    227
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default

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

Thread Participants: 1

Tags for this Thread