WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridSummaryColumn

    Show / Hide Table of Contents

    Class GridSummaryColumn

    Represents a class that defines the summary calculation based on particular column.

    Inheritance
    System.Object
    GridSummaryColumn
    Implements
    ISummaryColumn
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.WPF.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 Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the CustomAggregate dependency property.

    FormatProperty

    Identifies the Format dependency property.

    Declaration
    public static readonly DependencyProperty FormatProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the Format dependency property.

    MappingNameProperty

    Identifies the MappingName dependency property.

    Declaration
    public static readonly DependencyProperty MappingNameProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the MappingName dependency property.

    NameProperty

    Identifies the Name dependency property.

    Declaration
    public static readonly DependencyProperty NameProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the Name dependency property.

    SummaryTypeProperty

    Identifies the SummaryType dependency property.

    Declaration
    public static readonly DependencyProperty SummaryTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the SummaryType dependency property.

    Properties

    CustomAggregate

    Gets or sets the instance of to implement the custom summary.

    Declaration
    public ISummaryAggregate CustomAggregate { get; set; }
    Property Value
    Type Description
    ISummaryAggregate

    An instance of . The default value is null.

    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 string.Empty.

    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 of the column.

    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 string.Empty.

    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 string.Empty.

    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
    System.Windows.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
    System.Windows.Controls.DataTemplateSelector

    An Instance of DataTemplateSelector.

    Implements

    ISummaryColumn
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved