Interface ISummaryColumn
Defines common functionality for GridSummaryColumn for calculating and displaying the summary value.
Namespace: Syncfusion.Maui.Data
Assembly: Syncfusion.Maui.Data.dll
Syntax
public interface ISummaryColumn
Properties
CustomAggregate
Gets or sets the instance of ISummaryAggregate to implement the custom summary.
Declaration
ISummaryAggregate CustomAggregate { get; set; }
Property Value
Type | Description |
---|---|
ISummaryAggregate | An instance of ISummaryAggregate to implement the custom summary. The default value is null. |
DependentColumnNames
Gets or sets the dependent column names for this summary column. It refreshes the summary column data when any value of its dependent columns is changed.
Declaration
string DependentColumnNames { get; set; }
Property Value
Type |
---|
System.String |
Format
Gets or sets the string that indicates how the summary value is formatted in display.
Declaration
string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the format of summary value.The default value is |
Examples
this.dataGrid.TableSummaryRows.Add(new GridSummaryRow()
{
Name="Total Products",
ShowSummaryInRow = true,
Title = "Total Products Count: {ProductCount}",
SummaryColumns = new ObservableCollection<ISummaryColumn>()
{
new GridSummaryColumn()
{
Name="ProductCount",
MappingName="ProductName",
SummaryType=SummaryType.CountAggregate,
Format="{Count:d}"
},
}
});
MappingName
Gets or sets the corresponding MappingName of the column based on which the aggregate values of the summary column is to be calculated.
Declaration
string MappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the corresponding MappingName of the column based on which the aggregate
values of the summary column is to be calculated. The default value is |
Name
Gets or sets the name of summary column.
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the name of the summary column. The default value is |
Remarks
The name of the summary column and Title should be same for displaying summary value in the summary row, when the ShowSummaryInRow is true.
Examples
//Here, the Title and Name have the same ProductCount string.
this.dataGrid.TableSummaryRows.Add(new GridSummaryRow()
{
Name="Total Products",
ShowSummaryInRow = true,
Title = "Total Products Count: {ProductCount}",
SummaryColumns = new ObservableCollection<ISummaryColumn>()
{
new GridSummaryColumn()
{
Name="ProductCount",
MappingName="ProductName",
SummaryType=SummaryType.CountAggregate,
Format="{Count:d}"
},
}
});
SummaryType
Gets or sets the aggregate type for summary calculation.
Declaration
SummaryType SummaryType { get; set; }
Property Value
Type | Description |
---|---|
SummaryType | One of the SummaryType enumeration to specifies aggregate type for summary calculation. The default value is CountAggregate. |