Threaded 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

    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

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi