Version

ItemAdded Method (MaxSummaryCalculator)

Notifies when an item is added to the data source so the summary result can be updated.
Syntax
'Declaration
 
Public Overrides Function ItemAdded( _
   ByVal item As Object, _
   ByVal previousResult As ISummaryResult, _
   ByVal currentCount As Integer _
) As ISummaryResult
public override ISummaryResult ItemAdded( 
   object item,
   ISummaryResult previousResult,
   int currentCount
)

Parameters

item
The newly added item.
previousResult
The previous summary result.
currentCount
The current number of items available to the summary.

Return Value

The updated summary result.
Remarks
This allows the data source to update the summary result without having to re-iterate through the data source. If you are using a custom summary and need to re-iterate through all the items in order to calculate an accurate result then you can set the IsSummaryDirty property to let the data source know it needs to do this.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also