alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class TreeGridAggregateColumn

    Configures Tree Grid aggregate column.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    TreeGridAggregateColumn
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.TreeGrid
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class TreeGridAggregateColumn : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    TreeGridAggregateColumn()

    Declaration
    public TreeGridAggregateColumn()

    Properties

    ColumnName

    Defines the column name to display the aggregate value. If ColumnName is not defined, then field name value will be assigned to the columnName property.

    Declaration
    [Parameter]
    public string ColumnName { get; set; }
    Property Value
    Type Description
    string

    A string representing the column name for aggregate display.

    Examples
    <SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId">
        <TreeGridAggregates>
            <TreeGridAggregate>
                <TreeGridAggregateColumns>
                    <TreeGridAggregateColumn ColumnName="Total" Field="Sales" Type="Sum"></TreeGridAggregateColumn>
                </TreeGridAggregateColumns>
            </TreeGridAggregate>
        </TreeGridAggregates>
    </SfTreeGrid>

    Field

    Gets or sets the name of the column on which the aggregate function will be performed.

    Declaration
    [Parameter]
    public string Field { get; set; }
    Property Value
    Type Description
    string

    A string that specifies the column name to be used for displaying aggregate results.

    Examples
    <SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId">
        <TreeGridAggregates>
            <TreeGridAggregate>
                <TreeGridAggregateColumns>
                    <TreeGridAggregateColumn ColumnName="Total" Field="Sales" Type="Sum"></TreeGridAggregateColumn>
                </TreeGridAggregateColumns>
            </TreeGridAggregate>
        </TreeGridAggregates>
    </SfTreeGrid>

    FooterTemplate

    Defines the footer cell template as a string for the aggregate column. The Type name should be used to access aggregate values inside the template.

    Declaration
    [Parameter]
    public RenderFragment<object> FooterTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A RenderFragment representing the footer template with a generic type parameter.

    Examples
    <SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId">
        <TreeGridAggregates>
            <TreeGridAggregate>
                <TreeGridAggregateColumns>
                    <TreeGridAggregateColumn Field="Sales" Type="Sum" Format="C2">
                    <FooterTemplate>
                      @{
                         var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);
                            <div>
                                <p>Sum: @sumvalue.Sum</p>
                            </div>
                        }
                    </FooterTemplate>
                    </TreeGridAggregateColumn>
                </TreeGridAggregateColumns>
            </TreeGridAggregate>
        </TreeGridAggregates>
    </SfTreeGrid>

    Format

    Format is applied to a calculated value before it is displayed. Gets the format from the user, which can be standard or custom.

    Declaration
    [Parameter]
    public string Format { get; set; }
    Property Value
    Type Description
    string

    A string representing the format to apply.

    Examples
    <SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId">
        <TreeGridAggregates>
            <TreeGridAggregate>
                <TreeGridAggregateColumns>
                    <TreeGridAggregateColumn Field="Sales" Type="Sum" Format="C2"></TreeGridAggregateColumn>
                </TreeGridAggregateColumns>
            </TreeGridAggregate>
        </TreeGridAggregates>
    </SfTreeGrid>

    Type

    Defines the aggregate type of a particular column.
    Types of aggregate supported in-built are,
    Sum - Performs sum aggregation.
    Average - Performs average aggregation.
    Count - Performs count aggregation. FalseCount - Performs false count aggregation.
    TrueCount - Performs true count aggregation.
    Max - Performs max aggregation.
    Min - Performs min aggregation.

    Declaration
    [Parameter]
    public object Type { get; set; }
    Property Value
    Type
    object
    Examples
    <SfTreeGrid DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId">
        <TreeGridAggregates>
            <TreeGridAggregate>
                <TreeGridAggregateColumns>
                    <TreeGridAggregateColumn Field="Sales" Type="Sum"></TreeGridAggregateColumn>
                </TreeGridAggregateColumns>
            </TreeGridAggregate>
        </TreeGridAggregates>
    </SfTreeGrid>

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    OnInitializedAsync()

    Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved