CustomSummaryEventArgs.TotalValue Property

Gets or sets the total summary value.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.1.dll

Declaration

public object TotalValue { get; set; }
Public Property TotalValue As Object

Property Value

Type Description
Object

An object specifying the total summary value.

TotalValue is the total summary value that accumulates the custom calculated value. Note that this property should be initialized before the summary calculation process starts. To identify the status of the custom summary calculation, use the CustomSummaryEventArgs.SummaryProcess property. When performing calculations, you need to refresh the TotalValue property for it to be updated with the new values.

You can also modify the TotalValue property's value when finalizing the calculation. In this case, the CustomSummaryEventArgs.SummaryProcess property returns the CustomSummaryProcess.Finalize value.

Examples

This example shows how to use the GridControl.CalculateCustomSummary event to create a custom summary that counts the total number of data rows whose cells in the Shipped column (SwitchColumn) contain false.

<dxGrid:GridControl.TotalSummaries>
    <dxGrid:GridColumnSummary FieldName="Total" Type="Sum" 
                            DisplayFormat= "Total: {0:C0}"/>
    <dxGrid:GridColumnSummary FieldName="Shipped" Type="Custom" 
                            DisplayFormat= "Not Shipped: {0}"/>
</dxGrid:GridControl.TotalSummaries>

See Also