New to Telerik UI for .NET MAUIStart a free 30-day trial

Defines a custom type that may be used for custom value aggregation in data component. The interface needs to be cloneable due to the parallel data processing.

Definition

Namespace:Telerik.Maui.Controls.Data

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public interface IAggregateFunction

Methods

Applies the function logic to the provided value - that is the extracted value from the ViewModel.

C#
void Accumulate(object value)
Parameters:valueobject

Clones the current instance.

C#
IAggregateFunction Clone()
Returns:

IAggregateFunction

Gets the computed value.

C#
object GetValue()
Returns:

object

Merges this function with another one - this is used when Grand Totals are calculated.

C#
void Merge(IAggregateFunction aggregateFunction)
Parameters:aggregateFunctionIAggregateFunction

Updates the aggregate function by removing the contribution of an old value and adding a new value. This allows for efficient recalculation when data items are modified without recomputing the entire aggregation.

C#
void Update(object oldValue, object newValue)
Parameters:oldValueobjectnewValueobject