Back to Devexpress

GridColumnSummaryItemCollection.Add(SummaryItemType, String) Method

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

latest3.1 KB
Original Source

GridColumnSummaryItemCollection.Add(SummaryItemType, String) Method

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

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,
    string fieldName
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Function Add(
    summaryType As SummaryItemType,
    fieldName As String
) 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.

| | fieldName | String |

A string value that is field’s name used to calculate the summary. This parameter is used to initialize the GridColumnSummaryItem.FieldName 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:

See Also

GridColumnSummaryItem

FieldName

DisplayFormat

Format

SummaryType

GridColumnSummaryItemCollection Class

GridColumnSummaryItemCollection Members

DevExpress.XtraGrid Namespace