Hi All,
This is my first post on the Sencha Forum. I am working on a view that uses a grid with groups and a summary for each group. The thing is that some fields are empty (the grid functions as an overview for several sub-departments). When the first field of a group is empty, the summary sums up the values on a rather strange way:
grid.png
I work with Sencha Architect 2 and tried several things. Leaving the first value of a group empty disturbs the sum of the summary. Is this a possible bug or is it impossible to leave the first field empty for a reason?
Json store:
Code:
{ data: [{
type: 'Physical count image cell',
cmf: 195,
rmf: 0,
mounting: 90,
canvas: 150,
lamination: 0,
group: 'End of day'
},{
type: 'Physical count finished image cell',
cmf: 40,
group: 'End of day'
},{
type: 'Physical count finished frame',
cmf: 40,
group: 'End of day'
},{
type: 'Physical count ready to fit',
cmf: 40,
group: 'End of day'
},{
type: 'Open B2B orders',
cmf: 0,
group: 'End of day'
},{
type: 'Regulars',
rmf: 0,
mounting: 10,
canvas: 6,
lamination: 20,
group: 'Pickings'
},{
type: 'No mat regulars',
cmf: 85,
rmf: 10,
mounting: 12,
group: 'Pickings'
},{
type: 'Mat regulars',
cmf: 75,
rmf: 10,
group: 'Pickings'
},{
type: 'Quick-frame',
cmf: 70,
group: 'Pickings'
},{
type: 'OB2b regulars',
cmf: 0,
group: 'Pickings'
}]
}
Part of the grid:
Code:
{ xtype: 'gridpanel',
columnWidth: 0.8,
margin: 20,
title: 'Daily workload',
enableColumnHide: false,
forceFit: true,
store: 'dailyWorkload',
viewConfig: {
disableSelection: true,
loadingHeight: 250
},
features: [
{
ftype: 'groupingsummary',
groupHeaderTpl: '{name}'
}
],
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
ptype: 'cellediting',
clicksToEdit: 1
})
],
columns: [
{
xtype: 'gridcolumn',
draggable: false,
width: 250,
sortable: false,
dataIndex: 'type',
hideable: false,
menuDisabled: true
},
{
xtype: 'numbercolumn',
summaryType: 'sum',
sortable: false,
align: 'right',
dataIndex: 'cmf',
hideable: false,
text: 'CMF',
format: '0,000',
editor: {
xtype: 'numberfield',
allowDecimals: false
}
},
{
xtype: 'numbercolumn',
summaryType: 'sum',
sortable: false,
align: 'right',
dataIndex: 'rmf',
hideable: false,
menuDisabled: true,
text: 'RMF',
format: '0,000',
editor: {
xtype: 'numberfield',
labelAlign: 'right'
}
},
{
xtype: 'numbercolumn',
summaryType: 'sum',
sortable: false,
align: 'right',
dataIndex: 'mounting',
hideable: false,
menuDisabled: true,
text: 'Mounting',
format: '0,000',
editor: {
xtype: 'numberfield',
labelAlign: 'right'
}
},
{
xtype: 'numbercolumn',
summaryType: 'sum',
sortable: false,
align: 'right',
dataIndex: 'canvas',
hideable: false,
menuDisabled: true,
text: 'Canvas',
format: '0,000',
editor: {
xtype: 'numberfield',
labelAlign: 'right'
}
},
{
xtype: 'numbercolumn',
summaryType: 'sum',
sortable: false,
align: 'right',
dataIndex: 'lamination',
hideable: false,
menuDisabled: true,
text: 'Lamination',
format: '0,000',
editor: {
xtype: 'numberfield',
labelAlign: 'right'
}
}
]
}