The only thing that works is this bizare mix :
<RadzenGridColum .....>
<Template....>
<RadzenButton .../>
<FooterTemplate " >
<RadzenFooter ">
Total : 20
</RadzenFooter">
</FooterTemplate">
</Template">
</RadzenGridColumn">
But the standard grid footer and scroolbar vertical has disappeared :
@enchev This is not really a good solution for adding table totals. You are directly taking totals from datasource, what if there is a filter on the table?
You are right, I just tested what you said. Cheers!
However, the demo on (Blazor DataGrid footer totals) is calculating freight in footer using orders.Sum(o => o.Freight). It should be calculated by ordersGrid.View.Sum(o => o.Freight). That had me confused.
This is a matter of developer preference - wether they want to display totals for the current "view" (page, filter) or the entire data. We think the latter is more common.
I think we should have a third option for totals. That will be total of "entire data - excluded data(by filters)". That will be the more common preference.
Let's say one wants to see sales/purchases in totality entire data will cater to that but if we filter it by region, it has to fit in the view of no. of pages selected or we can't see the total without exporting/copying to excel.
Another way to do this: Filter event which will filter datasource according to filter.
As we already noted you can either use the variable bound to the DataGrid Data property or DataGrid View property. The rest is up to your case - you can write whatever LINQ expression.