Back to Devexpress

GridViewSummaryItemState.SummaryType Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-gridviewsummaryitemstate.md

latest3.2 KB
Original Source

GridViewSummaryItemState.SummaryType Property

Gets or sets the aggregate function type.

Namespace : DevExpress.Web.Mvc

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

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public SummaryItemType SummaryType { get; set; }
vb
Public Property SummaryType As SummaryItemType

Property Value

TypeDescription
SummaryItemType

A SummaryItemType enumeration value that specifies the aggregate function type.

|

Available values:

NameDescription
Sum

The sum of all values in a column.

| | Min |

The minimum value in a column.

| | Max |

The maximum value in a column.

| | Count |

The record count.

| | Average |

The average value of a column.

| | Custom |

Specifies whether calculations should be performed manually using a specially designed event.

| | None |

Disables summary value calculation.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SummaryType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-mvc-grid-custom-binding-and-xpo/CS/XPCustomBindingExample/XPO/XpoBindingHandlers.cs#L42

csharp
foreach(GridViewSummaryItemState summaryItem in e.SummaryItems) {
    Aggregate aggregateType = GetAggregateType(summaryItem.SummaryType);
    CriteriaOperator aggregatedExpression = new OperandProperty(summaryItem.FieldName);

asp-net-mvc-grid-custom-binding-and-xpo/VB/XPCustomBindingExample/XPO/XpoBindingHandlers.vb#L42

vb
For Each summaryItem As GridViewSummaryItemState In e.SummaryItems
    Dim aggregateType As Aggregate = GetAggregateType(summaryItem.SummaryType)
    Dim aggregatedExpression As CriteriaOperator = New OperandProperty(summaryItem.FieldName)

See Also

Grid View

GridViewSummaryItemState Class

GridViewSummaryItemState Members

DevExpress.Web.Mvc Namespace