Skip to main content

DataGridSummaryBuilder<T>.CalculateCustomSummary(String) Method

Specifies a custom aggregate function. This function is called for summary items whose summaryType is 'custom'. Mirrors the client-side calculateCustomSummary option.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public DataGridSummaryBuilder<T> CalculateCustomSummary(
    string jsFunc
)

Parameters

Name Type Description
jsFunc String

An inline or external JavaScript function.

Returns

Type Description
DataGridSummaryBuilder<T>

A reference to this instance after the method is called.

Remarks

Use this method to specify a JavaScript handler for the client-side calculateCustomSummary callback. This handler can be an inline function or an external function’s reference. Function arguments are described in the client API reference.

@(Html.DevExtreme().DataGrid()
    .Summary(summary => summary
        .CalculateCustomSummary("myDataGridSummary_calculateCustomSummary")
    )
)

<script>
    function myDataGridSummary_calculateCustomSummary(arg) {
        // Handler code
    }
</script>

Refer to Handle Events and Define Callbacks for more information.

See Also