Interface ISummaryColumn
Defines common functionality for GridSummaryColumn for calculating and displaying the summary value.
Namespace: Syncfusion.Data
Assembly: Syncfusion.Data.WinForms.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. |
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. |