Back to Devexpress

GridColumnSummaryItemCollection.Add(SummaryItemType) Method

windowsforms-devexpress-dot-xtragrid-dot-gridcolumnsummaryitemcollection-dot-add-x28-devexpress-dot-data-dot-summaryitemtype-x29.md

latest3.7 KB
Original Source

GridColumnSummaryItemCollection.Add(SummaryItemType) Method

Adds a new summary item to the current summary collection and initializes its summary type.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual GridColumnSummaryItem Add(
    SummaryItemType summaryType
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Function Add(
    summaryType As SummaryItemType
) As GridColumnSummaryItem

Parameters

NameTypeDescription
summaryTypeSummaryItemType

A SummaryItemType value that is the new item’s summary type. This parameter is used to initialize the GridSummaryItem.SummaryType property.

|

Returns

TypeDescription
GridColumnSummaryItem

A GridColumnSummaryItem object that is a new summary item added to the collection.

|

Remarks

This method sets the following properties as follows:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add(SummaryItemType) method.

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.

XPO_how-to-load-unique-distinct-data-via-xpo-e1001/CS/Distinct/Form1.cs#L173

csharp
gridControl1.MainView.PopulateColumns();
    gridView1.Columns[0].Summary.Add(DevExpress.Data.SummaryItemType.Count);
}

XPO_how-to-load-unique-distinct-data-via-xpo-e1001/VB/Distinct/Form1.vb#L168

vb
gridControl1.MainView.PopulateColumns()
    gridView1.Columns(0).Summary.Add(DevExpress.Data.SummaryItemType.Count)
End Sub

See Also

GridColumnSummaryItemCollection Class

GridColumnSummaryItemCollection Members

DevExpress.XtraGrid Namespace