xtype: 'grid',
width: '100%',
margin: '0 0 10px 0',
border: true,
columnLines: true,
enableLocking: true,
enableColumnHide: false,
sortableColumns: false,
features: [{
ftype: 'summary'
}],
store: store,
columns: [
{
xtype: 'actioncolumn',
text: '操作',
align: 'center',
width: 50,
items: [{
iconCls: 'x-fa fa-check',
tooltip: '',
handler: '#'
}
],
summaryRenderer: function (value, column, id, metaData) {
metaData.innerCls = "";
metaData.tdAttr = "colspan=2";
return "合计";
}
},
{
text: '',
align: 'center',
width: '44.5%',
dataIndex: 'sourceoffunds',
summaryRenderer: function (value, column, id, metaData) {
metaData.tdStyle = "display:none";
}
}, {
text: '',
align: 'right',
width: '44.4%',
dataIndex: 'budgetamount',
renderer: 'showFormatAmount',
summaryType: 'sum'
}
效果:
1 | 2 | 2 |
4 | 5 | 6 |
合计 | 8 |