samedi 20 décembre 2014

Grouped Grid Columns and Summary Issue

In SA when using grouped columns and the summary feature you must have the column type and summary type set correctly before adding a column to the group. After a column is grouped if you try to transform the column to another type the summaryType config option set will disappear. The option to set the summary type is also missing from the menu.

The grid below contains one column that has two other column grouped with it. The first number column has the summaryType option set and the option is available in the menu. This column already had the option set before it was dragged into the parent column. The second number column was originally a grid column that had the summary type set. When this column type was transformed to a number column the summary type disappeared.



Code:



Ext.define('MyDesktop.view.MyGridPanel9', {
extend: 'Ext.grid.Panel',
alias: 'widget.mygridpanel9',

requires: [
'MyDesktop.view.MyGridPanel9ViewModel',
'Ext.grid.column.Number',
'Ext.grid.View',
'Ext.grid.feature.Summary'
],

viewModel: {
type: 'mygridpanel9'
},
height: 250,
width: 400,
title: 'My Grid Panel',
store: 'desktop.Workflow',

columns: [
{
xtype: 'gridcolumn',
text: 'Grouped Column',
columns: [
{
xtype: 'numbercolumn',
summaryType: 'sum',
dataIndex: 'cd_amount2',
text: 'MyColumn177'
},
{
xtype: 'numbercolumn',
dataIndex: 'cd_amount2',
text: 'No Sum Type Available'
}
]
}
],
features: [
{
ftype: 'summary'
}
]

});





Grouped Grid Columns and Summary Issue

Aucun commentaire:

Enregistrer un commentaire