Skip to content

Commit

Permalink
update aggregates
Browse files Browse the repository at this point in the history
  • Loading branch information
didiyordanova committed Jan 22, 2025
1 parent 2fa79e3 commit 5faa6db
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
34 changes: 26 additions & 8 deletions controls/datagrid/aggregates/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,48 @@ slug: datagrid-aggregates

# .NET MAUI DataGrid Aggregates

The DataGrid exposes an Aggregates API through its `DataGridColumn.AggregateDescriptors` property where you can add `PropertyAggregateDescriptors` or `DelegateAggregateDescriptors`.
The DataGrid exposes an Aggregates API through its `DataGridColumn.AggregateDescriptors` collection, where you can add `PropertyAggregateDescriptor` and `DelegateAggregateDescriptor`.

{% if site.has_cta_panels == true %}
{% include cta-panel-overview.html %}
{% include cta-panel-maui-overview.html %}
{% endif %}

## Aggregate Descriptors

The [`PropertyAggregateDescriptor`]({%slug datagrid-property-aggregate-descriptor %}) enables you to use a set of available functions while the [`DelegateAggregateDescriptor`]({%slug datagrid-delegate-aggregate-descriptor %}) allows you to implement a custom function through the `IAggregateFunction` interface.

The Telerik UI for .NET MAUI DataGrid Aggregates can be placed in the `ColumnFooter` as well as the `GroupHeader` and `GroupFooter`.
## Aggregates Visualization

Visualize the aggregates inside the:

* DataGrid Column Footer
* DataGrid Group Header
* DataGrid Group Footer

The `ShowColumnFooters` property is used to visualize the [`ColumnFooters`]({%slug datagrid-column-footer %}) of the DataGrid and is also used to display the Aggregates for the columns.
### Aggregates in Column Footer

> The Aggregates are displayed only if there is no `FooterText` set.
Use the `ShowColumnFooters` property to visualize the [`ColumnFooters`]({%slug datagrid-column-footer %}) of the DataGrid. When applying aggregate descriptor(s) to the column, the aggregate results are displayed inside the column footer.

> The aggregate results are displayed inside the column footer only if there is no `FooterText` set.
![DataGrid Column Footer Aggregate](../images/datagrid-property-aggregate-windows.png)

When [grouping]({%slug datagrid-grouping-overview %}) is applied to the DataGrid, you can display the aggregate results for the groups data in the group footer. To visualize the footer, set the `ShowGroupFooters` property to `True`. The group footer is divided into cells which are aligned with the respective columns and show the aggregate results for the particular column.
### Aggregates in Group Header

![DataGrid Group Footer Aggregate](../images/datagrid-group-footer-aggregate.png)
When [grouping]({%slug datagrid-grouping-overview %}) is applied to the DataGrid, you can display the aggregate results for the groups data in the group header, next to the title of the group.

The aggregate results can also be visualized in the group header next to the title of the group. To show the Aggregates in the group header, set the `ShowGroupHeaderAggregates` to `True`.
To show the Aggregates in the group header, set the `ShowGroupHeaderAggregates` to `True`.

![DataGrid Group Header Aggregate](../images/datagrid-group-header-aggregate.png)

### Aggregates in Group Footer

When [grouping]({%slug datagrid-grouping-overview %}) is applied to the DataGrid, you can display the aggregate results for the groups data in the group footer.

To visualize the group footer, set the `ShowGroupFooters` property to `True`. The group footer is divided into cells which are aligned with the respective columns and show the aggregate results for the particular column.

![DataGrid Group Footer Aggregate](../images/datagrid-group-footer-aggregate.png)

>tip For an outline of all DataGrid features review the [.NET MAUI DataGrid Overview]({%slug datagrid-overview%}) article.
## See Also
Expand Down
3 changes: 1 addition & 2 deletions controls/datagrid/columns/frozen-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ Once a column is frozen, it is added to the `FrozenColumns` collection (read-onl

In a scenario when there is/are frozen column(s) and grouping, you can specify whether the group header will be clipped to the bounds of the frozen area by setting the `AreGroupHeadersClippedWhenFrozen` (`bool`) property. The default value is `False`.

Here is a result when the `AreGroupHeadersClippedWhenFrozen` property is set:
Here is the result when the `AreGroupHeadersClippedWhenFrozen` property is set:

![.NET MAUI DataGrid Frozen Columns and Group Headers](images/frozen-columns-group-headers.gif)


## Styling

When there is/are frozen column(s) a splitter UI is visualized. The splitter UI splits the frozen columns from the unfrozen.
Expand Down

0 comments on commit 5faa6db

Please sign in to comment.