i'm new to blazor and using syncfussion datagrid to show data coming from database. Now there are multiple types of data like string int or decimal. What i want to do is that i want to show columns wise sum of those which have int or decimal type and it has to be dynamically like if i'll add another int or decimal property it has to be going to show sum of that column as well. On each column footer there is sum of all the values of specific columns.
I'm attaching a image as a example
Please see refference image what i exactly want. In picture it showing sum of debit and credit but in my case there are multiple int or decimal values so i have to show it dynamically.
Simple way
You can use a
foreach
loop to add aggregates dynamically:In same file:
Using RenderFragment
You may consider developing a custom component for the aggregation segment. Here's a sample to serve as a starting point for your work:
This is a new file named
CustomAgg.razor
: