You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/datagrid/aggregates.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ documentation: ug
12
12
13
13
The aggregates feature in the Syncfusion Blazor DataGrid displays summary values in the footer, group footer, and group caption. It enables computing summary information for specific columns and presenting it at key locations in the DataGrid. Configure aggregates with the GridAggregates component. For each aggregate column, specify at least the [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_Field) and [Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_Type) properties.
14
14
15
-
For customized rendering, use aggregate templates and access values via AggregateTemplateContext (for example, Sum, Average, Min, Max, Count, TrueCount, and FalseCount). See: [AggregateTemplateContext](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateTemplateContext.html) and [AggregateType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateType.html).
15
+
For customized rendering, use aggregate templates and access values via AggregateTemplateContext (for example, **Sum, Average, Min, Max, Count, TrueCount**, and **FalseCount**). See: [AggregateTemplateContext](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateTemplateContext.html) and [AggregateType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateType.html).
16
16
17
17
**Displaying aggregate values**
18
18
@@ -139,15 +139,13 @@ The Syncfusion<sup style="font-size:70%">®</sup> Blazor DataGrid provides se
139
139
140
140
The available built-in aggregate types are :
141
141
142
-
* Sum: Calculates the sum of values in the column.
143
-
* Average: Calculates the average of values in the column.
144
-
* Min: Finds the minimum value in the column.
145
-
* Max: Finds the maximum value in the column.
146
-
* Count: Counts the number of values in the column.
147
-
* TrueCount: Counts the number of true values in the column.
148
-
* FalseCount: Counts the number of false values in the column.
149
-
150
-
The following example demonstrates built-in aggregate types with footer templates. Access aggregate values through AggregateTemplateContext using the matching type property (for example, Max, Min, TrueCount):
142
+
***Sum**: Calculates the sum of values in the column.
143
+
***Average**: Calculates the average of values in the column.
144
+
***Min**: Finds the minimum value in the column.
145
+
***Max**: Finds the maximum value in the column.
146
+
***Count**: Counts the number of values in the column.
147
+
***TrueCount**: Counts the number of true values in the column.
148
+
***FalseCount**: Counts the number of false values in the column.
> To access a custom aggregate value inside a template, use the `Custom` key (AggregateTemplateContext.Custom).
111
+
> To access a custom aggregate value inside a template, use the **Custom** key (**AggregateTemplateContext.Custom**).
114
112
115
113
**Show the count of distinct values in aggregate row**
116
114
117
-
Custom aggregate functions can also compute distinct counts or other domain-specific summaries. Specify the [Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_Type) as Custom and provide a function via the [CustomAggregate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_CustomAggregate) property. The result can be rendered in the footer, group footer, or group caption by using the corresponding template and accessing AggregateTemplateContext.Custom.
118
-
119
-
Here’s an example that shows the count of distinct values for the ShipCountry column using a custom aggregate:
115
+
Custom aggregate functions can also compute distinct counts or other domain-specific summaries. Specify the [Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_Type) as Custom and provide a function via the [CustomAggregate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_CustomAggregate) property. The result can be rendered in the footer, group footer, or group caption by using the corresponding template and accessing **AggregateTemplateContext.Custom**.
Copy file name to clipboardExpand all lines: blazor/datagrid/footer-aggregate.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ documentation: ug
11
11
12
12
The Syncfusion<supstyle="font-size:70%">®</sup> Blazor DataGrid supports calculating and displaying aggregate values in footer cells. Footer aggregates summarize column values across rows and render in the DataGrid footer. Use the [FooterTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_FooterTemplate) property to render aggregate values in footer cells.
13
13
14
-
Access aggregate values inside `FooterTemplate` through the implicit template parameter `context`. Cast `context` to [AggregateTemplateContext](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateTemplateContext.html) to read properties such as Sum, Average, Min, Max, Count, TrueCount, and FalseCount.
14
+
Access aggregate values inside `FooterTemplate` through the implicit template parameter **context**. Cast **context** to [AggregateTemplateContext](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.AggregateTemplateContext.html) to read properties such as **Sum, Average, Min, Max, Count, TrueCount,** and **FalseCount**.
Copy file name to clipboardExpand all lines: blazor/datagrid/group-and-caption-aggregate.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,12 @@ documentation: ug
11
11
12
12
Group footer and group caption aggregates in the Syncfusion<supstyle="font-size:70%">®</sup> Blazor DataGrid calculate values based on items in each group and display results in group footer cells and group caption cells. Configure these using the [GroupFooterTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_GroupFooterTemplate) and [GroupCaptionTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_GroupCaptionTemplate) properties of the [GridAggregateColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn__ctor) component. Aggregate values inside templates can be accessed through AggregateTemplateContext (for example, Sum, Min, Max).
13
13
14
-
> For group aggregates, ensure grouping is enabled at the grid level with AllowGrouping set to true, and maintain grouped columns by setting [ShowGroupedColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridGroupSettings.html#Syncfusion_Blazor_Grids_GridGroupSettings_ShowGroupedColumn) to true.
14
+
> For group aggregates, ensure grouping is enabled at the grid level with [AllowGrouping](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_AllowGrouping) set to **true**, and maintain grouped columns by setting [ShowGroupedColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridGroupSettings.html#Syncfusion_Blazor_Grids_GridGroupSettings_ShowGroupedColumn) to **true**.
15
15
16
16
## Group footer aggregates
17
17
18
18
Group footer aggregates appear in the footer cells of each group and provide per-group summary values. To display group footer aggregates, define a template with the [GroupFooterTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_GroupFooterTemplate) property. The template renders the aggregate value for each group’s footer row. Apply the Format property to present currency or date values using culture-aware formatting as needed.
19
19
20
-
The following example demonstrates group footer aggregates in the DataGrid:
21
-
22
20
{% tabs %}
23
21
{% highlight razor tabtitle="Index.razor" %}
24
22
@using Syncfusion.Blazor.Grids
@@ -110,14 +108,12 @@ The following example demonstrates group footer aggregates in the DataGrid:
Group caption aggregates appear in the caption cells at the top of each group and provide a concise summary. To display group caption aggregates, define a template using the [GroupCaptionTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridAggregateColumn.html#Syncfusion_Blazor_Grids_GridAggregateColumn_GroupCaptionTemplate) property. The template renders the aggregate value in the caption area of each group. Apply the Format property to aggregate values to present culture-aware currency or date results.
118
116
119
-
The following example demonstrates group caption aggregates in the DataGrid:
Copy file name to clipboardExpand all lines: blazor/datagrid/reactive-aggregate.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,6 @@ The Syncfusion<sup style="font-size:70%">®</sup> Blazor DataGrid supports re
15
15
16
16
When the DataGrid is in batch editing mode, aggregate values in the footer, group footer, and group caption are refreshed each time a cell edit is saved. This ensures that summaries reflect the most recent edits.
17
17
18
-
The following example demonstrates automatic aggregate value updates in batch editing:
0 commit comments