Skip to main content

TreeListCustomSummaryEventArgs.Value Property

Gets or sets the summary value.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public object Value { get; set; }

Property Value

Type Description
Object

An object that represents the summary value.

Remarks

The Value property represents the 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 TreeListCustomSummaryEventArgs.SummaryProcess property. When performing calculations, you need to refresh the Value property for it to be updated with the new values.

Example

This example shows how to implement a custom summary calculation.

Create a summary item within the ASPxTreeList.Summary collection and customize its settings as shown below:

exCustomSummaryCalculate_1

The ASPxTreeList.CustomSummaryCalculate event is handled to sum the budgets of selected departments. Finally, set the TreeListSettingsBehavior.ProcessSelectionChangedOnServer option to true.

The image below shows the result:

exCustomSummaryCalculate_res

using DevExpress.Data;

protected void ASPxTreeList2_CustomSummaryCalculate(object sender,
TreeListCustomSummaryEventArgs e) {
    switch (e.SummaryProcess) {
        case CustomSummaryProcess.Start:
            e.Value = (int)0;
            break;
        case CustomSummaryProcess.Calculate:
            if (e.Node.Selected)
                e.Value = (int)e.Value + (int)e.Node["Budget"];
            break;
        case CustomSummaryProcess.Finalize:
            break;
    }
}
See Also