Class GridSummaryColumn
Represents a class that defines the summary calculation based on particular column.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class GridSummaryColumn : DependencyObject, ISummaryColumn
Constructors
GridSummaryColumn()
Declaration
public GridSummaryColumn()
Fields
CustomAggregateProperty
Identifies the CustomAggregate dependency property.
Declaration
public static readonly DependencyProperty CustomAggregateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CustomAggregate dependency property.
FormatProperty
Identifies the Format dependency property.
Declaration
public static readonly DependencyProperty FormatProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Format dependency property.
MappingNameProperty
Identifies the MappingName dependency property.
Declaration
public static readonly DependencyProperty MappingNameProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the MappingName dependency property.
NameProperty
Identifies the Name dependency property.
Declaration
public static readonly DependencyProperty NameProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Name dependency property.
SummaryTypeProperty
Identifies the SummaryType dependency property.
Declaration
public static readonly DependencyProperty SummaryTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SummaryType dependency property.
Properties
CustomAggregate
Gets or sets the instance of
Declaration
public ISummaryAggregate CustomAggregate { get; set; }
Property Value
Type | Description |
---|---|
ISummaryAggregate | An instance of |
Format
Gets or sets the string that indicates how the summary value is formatted in display.
Declaration
public 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
Declaration
public string MappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the valid mapping name of column. The default value is |
Name
Gets or sets the name of summary column.
Declaration
public 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 with title.
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
public SummaryType SummaryType { get; set; }
Property Value
Type | Description |
---|---|
SummaryType | One of the SummaryType enumeration to specifies the aggregate type for summary calculation. The default value is CountAggregate. |
Template
Gets or sets the System.Windows.DataTemplate used to display the summary cell.
Declaration
public DataTemplate Template { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.DataTemplate | An instance of DataTemplate. |
TemplateSelector
Gets or sets the custom logic for choosing a System.Windows.DataTemplate used to display the summary cell.
Declaration
public DataTemplateSelector TemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.DataTemplateSelector | An Instance of DataTemplateSelector. |