Hi,
I've got a Datagrid grouped by two different groups.The footer templates seems to be working just for the first group. Is it possible to define the footerTemplate for more than one group.
This is the datasource:
dataSource: {
group:[
{field: "style", dir: "desc",
aggregates: [
{ field: "style", aggregate: "count" },
{ field: "fob", aggregate: "sum" },
{ field: "quantity", aggregate: "sum" },
{ field: "approvedQuantity", aggregate: "sum" },
{ field: "sellingTotal", aggregate: "sum" },
{ field: "fobTotal", aggregate: "sum" },
],
},
{
field: "colour", dir: "desc",
aggregates: [
{ field: "style", aggregate: "count" },
{ field: "fob", aggregate: "sum" },
{ field: "quantity", aggregate: "sum" },
{ field: "approvedQuantity", aggregate: "sum" },
{ field: "sellingTotal", aggregate: "sum" },
{ field: "fobTotal", aggregate: "sum" },
],
}
],
And this is the column:
{
field: "colour",
title: "Colour",
footerTemplate: function (data) {
return "<div style='text-align:right'>Total Buy Margin: 100%</div>"
},
groupFooterTemplate: function (data) {
var groupBuyMargin = 98; // This is just an example
return "<div style='text-align:right'>Style Buy Margin: " + groupBuyMargin + "%</div>"
},
}
Thanks,
Paul