All docs
V20.2
20.2 (EAP/Beta)
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
You are viewing help content for pre-release software. This document and the features it describes are subject to change.

SummaryItemCollectionBase<T>.AddRange(IEnumerable<T>) Method

Adds a range of summary items to the collection.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

Declaration

public void AddRange(
    IEnumerable<T> summaries
)
Public Sub AddRange(
    summaries As IEnumerable(Of T)
)

Parameters

Name Type Description
summaries IEnumerable<T>

A range of summary items (GridSummaryItem / TreeListSummaryItem).

Remarks

The following code sample adds summary items to the GridControl.TotalSummary collection:

grid.TotalSummary.AddRange(new List<GridSummaryItem>() {
    new GridSummaryItem() { 
        SummaryType = SummaryItemType.Count, 
        FieldName = "OrderID" 
    },
    new GridSummaryItem() { 
        SummaryType = SummaryItemType.Max, 
        FieldName = "ModelPrice" 
    }
});

The collection contains the Add and AddRange methods to add summary items:

  • When you use the Add methods, each method call updates the GridControl. To improve performance of adding operations, enclose the changes within the BeginUpdate and EndUpdate method calls. In this case, the GridControl is updated after the last call.
  • When you use the AddRange method, the method call updates the GridControl after all summary items are added. You do not need to enclose changes within the BeginUpdate and EndUpdate method calls.
See Also