我有我總結的結果的問題:摘要多頁
我有結果的複式頁,我想整列的總和,但在我的情況下,它給了每個列的總和頁...
由於我的英語很差,我想你根本不懂任何事情。所以,我想給你一個例子:
我有這樣的:
第1頁
總:2
第2頁
總數:5
但我想在每一頁總整列的這樣的:
頁面1
總:(5 + 2)
頁2
合計:(5 + 2)
這裏是我的代碼:
Ext.applyIf(me, {
forceFit: true,
loadMask: false,
features: [{
ftype: 'summary',
dock: 'bottom'
}],
columns: [
{
header: ressources.HeaderTypeStockText,
dataIndex: 'libelleTypeStock',
summaryRenderer: function(){
return '<b> Total <b>';
},
flex: 0.1
},
{
header: ressources.HeaderQuantiteText,
dataIndex: 'quantite',
summaryType: 'sum',
flex: 0.1
},
{
header: ressources.HeaderPoidsText,
dataIndex: 'poids',
summaryType: 'sum',
flex: 0.1
}
],
store: storeGrid,
// paging bottom bar
bbar: Ext.create('Ext.PagingToolbar', {
store: storeGrid,
displayInfo: true,
displayMsg: ressources.GridDisplayMsg,
emptyMsg: ressources.GridEmptyMsg
})
});
誰能幫助我嗎? 感謝
我試過這個,但它沒有工作......它不能識別「each」:'summaryType:function(store,records,field){var sum,courant = 0; store.each(function(records){ courant = 0; sum = courant + records.get('quantite'); }); 歸還金額; },'。 – wonderwoman
做一個console.log(存儲),看看它是否包含一個商店。 –
它包含一個商店,但它不能識別「每個」作爲一個函數:/ – wonderwoman