Skip to main content
A newer version of this page is available. .

GridColumn.SummaryItem Property

Provides access to the column’s footer summary settings.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

[DXCategory("Data")]
[XtraSerializableProperty(XtraSerializationVisibility.Content)]
[XtraSerializablePropertyId(2)]
public GridSummaryItem SummaryItem { get; }

Property Value

Type Description
GridSummaryItem

A GridSummaryItem object containing the column’s footer summary settings.

Remarks

Grid allows you to add single or multiple total summaries for a column. Use this property to add a single summary within a column footer, or the GridColumn.Summary property to add multiple total summaries.

Use the SummaryItem property to set up the column’s footer summary. The object returned by this property allows you to set the field against whose values the summary is calculated, the aggregate function applied to field values, and the summary value format. Note that you can choose one of the predefined aggregate functions or implement your own function. Refer to the Summaries help topic and the GridSummaryItem class description for additional information.

Summary Item 1

Footer summaries are displayed within footer cells corresponding to columns.

Example

The example demonstrates how to calculate a single total summary for a grid column via the GridColumn.SummaryItem property.

Adding Single Summary Item

colUnitsInStock1.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Average;
colUnitsInStock1.SummaryItem.DisplayFormat = "Average = {0:n2}";

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SummaryItem property.

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.

See Also