PDA

View Full Version : [FIXED] showSummaryRow in summary feature



mario.casola
13 Apr 2013, 6:20 AM
Hi,

when dock config is set, top or bottom, showSummaryRow is ignored. Also toggleSummaryRow and view refresh has no effect.

Best regards
Mario Casola

*EDIT BY SLEMMON



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'
, id: 'summary'
//, dock: 'top'
, showSummaryRow: false
}],
tbar: [{
text: 'Toggle Summary Row'
, enableToggle: true
, toggleHandler: function (btn, pressed) {
btn.up('gridpanel').getView().getFeature('summary').toggleSummaryRow();
}
}],
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'
}]
});

mario.casola
13 Apr 2013, 6:42 AM
I'm using version 4.2

slemmon
13 Apr 2013, 2:58 PM
Thanks for the report! I have opened a bug in our bug tracker.

benoror
11 Dec 2014, 4:32 PM
showSummaryRow (http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.grid.feature.AbstractSummary-cfg-showSummaryRow) is still ignored. Just tried in ExtJS 5.1


Bug should be OPEN

gabe.galperin
11 Jun 2015, 8:42 AM
Has anyone found a workaround to make the showSummaryRow / toggleSummaryRow work when the dock property is set?