GridGroupSummaryItemCollection.Add(SummaryItemType, String, GridColumn, String) Method
Creates a new group summary item with predefined settings and adds it to the end of the collection.
Namespace: DevExpress.XtraGrid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual GridGroupSummaryItem Add(
SummaryItemType summaryType,
string fieldName,
GridColumn showInColumn,
string displayFormat
)
#Parameters
Name | Type | Description |
---|---|---|
summary |
Summary |
A Summary |
field |
String | A String value specifying the name of a dataset field whose values are used for summary calculation. This value initializes the created item’s Grid |
show |
Grid |
A Grid |
display |
String | A String value specifying summary values formatting. This value initializes the new item’s Grid |
#Returns
Type | Description |
---|---|
Grid |
A Grid |
#Remarks
If you need to add several group summary items to the collection, consider using the GridSummaryItemCollection.BeginUpdate and GridSummaryItemCollection.EndUpdate methods to prevent the collection from being updated until all required items have been added. Alternatively, you can use the GridSummaryItemCollection.AddRange method, which adds the specified summary items array.
To remove a summary item from the collection, use the GridSummaryItemCollection.Remove method.