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: controls/datagrid/aggregates/overview.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,11 @@ To show the Aggregates in the group header, set the `ShowGroupHeaderAggregates`
42
42
43
43

44
44
45
+
To align the aggregates in the group according to its header set the `GroupAggregatesAlignment` (`enum` of type `Telerik.Maui.Controls.DataGrid.DataGridGroupAggregatesAlignment`) property. The available options are:
46
+
47
+
* (default)`None`—Aggregates are not aligned to the DataGrid columns. The aggregates results are displayed after the text displayed for the group key.
48
+
*`NextToHeader`—Aggregate results are aligned to the DataGrid columns and placed next to the header of the group.
49
+
45
50
### Aggregates in Group Footer
46
51
47
52
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.
Copy file name to clipboardExpand all lines: controls/datagrid/aggregates/styling.md
+66-1Lines changed: 66 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,11 @@ Use the following properties to style the `GroupHeader`:
36
36
37
37
### Style the Aggregates in the Group Header
38
38
39
-
You can style the appearance of the aggregate results in the group header by setting the following properties to the `GroupHeaderStyle`:
39
+
You can style the appearance of the aggregate results based on the value of the `GroupAggregatesAlignment` (`enum` of type `Telerik.Maui.Controls.DataGrid.DataGridGroupAggregatesAlignment`) property.
40
+
41
+
To style the aggregates in the group header when the value for the `GroupAggregatesAlignment` is `None`, use the `GroupHeaderStyle` (of type `Style` with target type `DataGridGroupHeaderAppearance`) property.
42
+
43
+
The available properties in the `GroupHeaderStyle` are:
40
44
41
45
| Property | Description |
42
46
| ------ | ------ |
@@ -50,6 +54,67 @@ The following example shows how to style the aggregate results in the group head
To style and customize the aggregate results when setting the `GroupAggregatesAlignment` to `NextToHeader`, use the following properties:
58
+
59
+
*`GroupAggregateCellStyle` (of type `Style` with target type `DataGridGroupAggregateCellAppearance`)—Defines the style of the aggregates cell within the group header of the DataGrid.
60
+
*`GroupAggregateCellStyleSelector` (`IStyleSelector`)—Allows you to set different styles for each aggregate within the group header of the DataGrid by passing the `GroupAggregateCellContext` in the selector.
61
+
*`GroupAggregateCellTemplate` (`DataTemplate`)—Defines the appearance of each aggregate within the group header of the DataGrid.
62
+
63
+
> The properties listed above are properties inside the `RadDataGrid` instance.
64
+
The table below describes the available properties for the `GroupAggregateCellStyle`:
65
+
66
+
| Property | Description |
67
+
| ------ | ------ |
68
+
|`TextColor`| Defines the color of the cell text. |
69
+
|`FontAttributes`| Defines the font attributes for the text in the cell. |
70
+
|`FontFamily`| Defines the font family for the text in the cell. |
71
+
|`FontSize`| Defines the size for the text in the cell. |
72
+
|`Margin`| Defines the margin that is applied to the text of the cell. |
73
+
74
+
#### Example with the `GroupAggregateCellStyle`
75
+
76
+
**1.** Define the DataGrid in XAML:
77
+
78
+
<snippetid='datagrid-group-header-aggregates'/>
79
+
80
+
**2.** Define the `GroupAggregateCellStyle` in the page's resources:
>important For the DataGrid `GroupHeaderAggregates Style` example refer to the [SDKBrowser Demo application]({%slug sdkbrowser-app%}) and navigate to the **DataGrid > Aggregates** category.
93
+
94
+
#### Example with the `GroupAggregateCellStyleSelector`
>important For the DataGrid `GroupHeaderAggregates StyleSelector` example refer to the [SDKBrowser Demo application]({%slug sdkbrowser-app%}) and navigate to the **DataGrid > Aggregates** category.
117
+
53
118
## Style the Group Footer
54
119
55
120
The DataGrid provides the following options for styling its group footer:
0 commit comments