The example on documentation about customAggregate doesn't work.
The property customAggregate looking for a c# object not a javascript function, and if I create a C# function like this
object Foo()
{
return 0;
}
the result is not displayed.
<ejs-grid id="Grid" dataSource=@ViewBag.DataSource allowPaging="true">
<e-grid-aggregates>
<e-grid-aggregate>
<e-aggregate-columns>
<e-aggregate-column field="ShipCountry" type="Custom" footerTemplate="Brazil Count:${Custom}" customAggregate="customAggregateFn">e-aggregate-column>
e-aggregate-columns>
e-grid-aggregate>
e-grid-aggregates>
<e-grid-pagesettings pageCount="5">e-grid-pagesettings>
<e-grid-columns>
<e-grid-column field="CustomerID" headerText="Customer Name" width="150">e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" format="C2" width="160">e-grid-column>
<e-grid-column field="OrderDate" headerText="Order Date" format="yMd" textAlign="Right" width="130">e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" width="140">e-grid-column>
e-grid-columns>
ejs-grid>
<script>
function customAggregateFn (data) {
return data.result.filter(function (item) {
return item['ShipCountry'] === 'Brazil';
}).length;
}
>
Is possible to completely customize the groupFooter and/or the captionFooter has a single line like this:
Customer: 100, Budget: € 15.000,00 - AmountTotal € 18.000
Thanks