Hi,
The summary of the column can be set to a function so it can calculate a custom summary.
` columns: [
{
label: ‘#’, width: 200, dataField: ‘id’
},
{
label: ‘First Name’, dataField: ‘firstName’
},
{ label: ‘Last Name’, dataField: ‘lastName’ },
{ label: ‘Product’, dataField: ‘productName’ },
{ label: ‘Quantity’, dataField: ‘quantity’, summary: [‘min’, ‘max’], align: ‘right’, cellsAlign: ‘right’, },
{ label: ‘Unit Price’, dataField: ‘price’, align: ‘right’, cellsAlign: ‘right’, cellsFormat: ‘c2’ },
{
label: ‘Total’, dataField: ‘total’, align: ‘right’, summary: ([{
‘Custom’: (currentValue, cellValue, dataField, data) => {
return currentValue + cellValue
}
}]), cellsAlign: ‘right’, cellsFormat: ‘c2’
}
]`
Best regards,
Markov
Smart UI Team
https://www.htmlelements.com/