Skip to main content

GridColumnSummaryItemCollection.Add(SummaryItemType, String, String, IFormatProvider) Method

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

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

[EditorBrowsable(EditorBrowsableState.Never)]
public virtual GridColumnSummaryItem Add(
    SummaryItemType summaryType,
    string fieldName,
    string displayFormat,
    IFormatProvider formatProvider
)

Parameters

Name Type Description
summaryType SummaryItemType

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

displayFormat String

A string value that is the display format of the summary. The parameter is used to initialize the GridSummaryItem.DisplayFormat property.

formatProvider IFormatProvider

A IFormatProvider value that provides the format of the summary. The parameter is used to initialize the GridSummaryItem.Format property.

Returns

Type Description
GridColumnSummaryItem

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

See Also