Back to Devexpress

GridGroupSummaryItemCollection.Add(SummaryItemType, String, GridColumn, String, IFormatProvider) Method

windowsforms-devexpress-dot-xtragrid-dot-gridgroupsummaryitemcollection-dot-add-x28-devexpress-dot-data-dot-summaryitemtype-system-dot-string-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-system-dot-string-system-dot-iformatprovider-x29.md

latest4.0 KB
Original Source

GridGroupSummaryItemCollection.Add(SummaryItemType, String, GridColumn, String, IFormatProvider) Method

Creates a new group summary item with the specified settings and adds it to the end of the collection.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual GridGroupSummaryItem Add(
    SummaryItemType summaryType,
    string fieldName,
    GridColumn showInColumn,
    string displayFormat,
    IFormatProvider formatProvider
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Function Add(
    summaryType As SummaryItemType,
    fieldName As String,
    showInColumn As GridColumn,
    displayFormat As String,
    formatProvider As IFormatProvider
) As GridGroupSummaryItem

Parameters

NameTypeDescription
summaryTypeSummaryItemType

A SummaryItemType enumeration value specifying the aggregation function type. This value initializes the new item’s GridSummaryItem.SummaryType property.

| | fieldName | String |

A String value specifying the name of a dataset field whose values are used for summary calculation. This value initializes the new item’s GridSummaryItem.FieldName property.

| | showInColumn | GridColumn |

A GridColumn object (or descendant) specifying the column whose footer cells should display summary values. null ( Nothing in Visual Basic) to display summary values within group rows. This value initializes the created item’s GridGroupSummaryItem.ShowInGroupColumnFooter property.

| | displayFormat | String |

A String value specifying the summary value’s format. This value initializes the new item’s GridSummaryItem.DisplayFormat property.

| | formatProvider | IFormatProvider |

An IFormatProvider object that implements a formatting routine. This value is assigned to the GridSummaryItem.Format property.

|

Returns

TypeDescription
GridGroupSummaryItem

A GridGroupSummaryItem object representing the new summary item.

|

See Also

GridGroupSummaryItemCollection Class

GridGroupSummaryItemCollection Members

DevExpress.XtraGrid Namespace