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: MAUI/DataGrid/summaries.md
+227Lines changed: 227 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -375,6 +375,82 @@ SfDataGrid supports displaying both column summaries and title summaries simulta
375
375
376
376
In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
GridSummaryRow captionSummaryRow = new GridSummaryRow()
427
+
{
428
+
Title = "Customer ID : {Key} - {ProductCount} Items",
429
+
TitleColumnCount = 2,
430
+
SummaryColumns = new ObservableCollection<ISummaryColumn>()
431
+
{
432
+
new GridSummaryColumn()
433
+
{
434
+
Name = "CustomerName",
435
+
MappingName = "CustomerName",
436
+
SummaryType = SummaryType.CountAggregate,
437
+
Format = "{Count}"
438
+
},
439
+
new GridSummaryColumn()
440
+
{
441
+
Name = "ProductCount",
442
+
MappingName = "ProductName",
443
+
SummaryType = SummaryType.CountAggregate,
444
+
Format = "{Count}"
445
+
}
446
+
}
447
+
};
448
+
449
+
dataGrid.CaptionSummaryRow = captionSummaryRow;
450
+
451
+
{% endhighlight %}
452
+
{% endtabs %}
453
+
378
454
### Limitations
379
455
380
456
The following are the limitations of displaying column summary along with title at same time for DataGridSummaryRow:
@@ -680,6 +756,69 @@ SfDataGrid supports displaying both column summaries and title summaries simulta
680
756
681
757
In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
GridSummaryRow groupSummaryRow = new GridSummaryRow()
802
+
{
803
+
Title = "Total Price: {PriceAmount} for {ProductCount} Products",
804
+
TitleColumnCount = 2,
805
+
SummaryColumns = new ObservableCollection<ISummaryColumn>()
806
+
{
807
+
new GridSummaryColumn()
808
+
{
809
+
Name = "CustomerName",
810
+
MappingName = "CustomerName",
811
+
SummaryType = SummaryType.CountAggregate,
812
+
Format = "{Count}"
813
+
}
814
+
}
815
+
};
816
+
817
+
dataGrid.GroupSummaryRows.Add(groupSummaryRow);
818
+
819
+
{% endhighlight %}
820
+
{% endtabs %}
821
+
683
822
### Limitations
684
823
685
824
The following are the limitations of displaying column summary along with title at same time for DataGridSummaryRow:
@@ -1141,6 +1280,94 @@ SfDataGrid supports displaying both column summaries and title summaries simulta
1141
1280
1142
1281
In the code snippet below, DataGridTableSummaryRow.TitleColumnCount is set as 2, and [DataGridTableSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
0 commit comments