GridSummaryItem.SummaryValue Property
Gets the total summary item’s calculated value. If the AutoUpdateTotalSummary setting is disabled, this value may not reflect the latest View data. To ensure the summary is up to date, call the GridView.UpdateTotalSummary method to forcibly recalculate summaries.
Namespace: DevExpress.XtraGrid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Property Value
Type | Description |
---|---|
Object | A Object representing the total summary value. |
#Remarks
Use the SummaryValue
property to obtain total summary values.
using DevExpress.XtraGrid;
...
// Create a total summary that calculates the total number of employees
GridColumnSummaryItem summary = new GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, "EmployeeID", "{0} Employees") { Tag = "Employees" };
gridView.Columns["EmployeeID"].Summary.Add(summary);
// Display a footer with total summaries
gridView.OptionsView.ShowFooter = true;
...
// Obtain a total summary value
object count = colEmployeeID.Summary["Employees"].SummaryValue;
Use the GridView.GetGroupSummaryValues method to obtain group summary values.
Refer to the following help topic for additional information: Working with Summaries in Code. Custom Summaries.
Note
In master detail mode, when a master row is expanded, the Data Grid creates a Pattern View to display detail data. Pattern Views only store settings and are never connected to data. To access summaries in detail views, use columns and summaries of clone Views.
Refer to the following help topic for additional information: Master-Detail Relationships.