The requested page is not available for the requested platform. You are viewing the content for Default platform.

GridViewSettings.CustomSummaryCalculate Property

Enables you to calculate summary values manually.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll


public CustomSummaryEventHandler CustomSummaryCalculate { get; set; }
Public Property CustomSummaryCalculate As CustomSummaryEventHandler

Property Value

Type Description

A CustomSummaryEventHandler delegate method allowing you to implement custom processing.



The custom summary calculation option is not available in server mode. Please refer to the Binding to Large Data (Database Server Mode) help topic for more information.


settings.CustomSummaryCalculate = (s, e) => {
    ASPxSummaryItem summary = e.Item as ASPxSummaryItem;
    MVCxGridView gridView = s as MVCxGridView;
    if (summary.FieldName != "TotalAmount")
    if (e.IsGroupSummary) {
        decimal totalValue;
        if (e.SummaryProcess == Start) {
            totalValue = 0;
        } else if (e.SummaryProcess == Calculate) {
            bool isCancelled = (bool)e.GetValue("isCancelled");
            if (!isCancelled) {
                totalValue += (int)e.FieldValue;
        else if (e.SummaryProcess == Finalize) {
            e.TotalValue = totalValue;
            e.TotalValueReady = true;
See Also