Summary: It is impossible to use the summaryRenderer in Architect without creating an override and changing the Architect generated code.
I created a test grid project in Archtiect 3.0.3.1382 and ST 2.3.x
Set summaryType to anything, say, "sum".
Then try to add a summaryRenderer. Architect generates code like this (missing parameter):
summaryRenderer: function() {
}
instead of like this:
summaryRenderer: function(value) {
}
Which prevents you from getting to the calculated value.
When I create an override and add in the missing parameter, it works as expected. For example, this works correctly as an override...
{
xtype: 'column',
summaryRenderer: function(value) {
return Ext.Number.toFixed(value, 2);
},
width: 110,
dataIndex: 'amount',
summaryType: 'sum',
text: 'Amount'
}
I created a test grid project in Archtiect 3.0.3.1382 and ST 2.3.x
Set summaryType to anything, say, "sum".
Then try to add a summaryRenderer. Architect generates code like this (missing parameter):
summaryRenderer: function() {
}
instead of like this:
summaryRenderer: function(value) {
}
Which prevents you from getting to the calculated value.
When I create an override and add in the missing parameter, it works as expected. For example, this works correctly as an override...
{
xtype: 'column',
summaryRenderer: function(value) {
return Ext.Number.toFixed(value, 2);
},
width: 110,
dataIndex: 'amount',
summaryType: 'sum',
text: 'Amount'
}
Aucun commentaire:
Enregistrer un commentaire