Skip to main content

GridSummaryItem.FieldName Property

Gets or sets the name of a dataset field whose values are used for summary calculation.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

[XtraSerializableProperty(1)]
[DXCategory("Data")]
public virtual string FieldName { get; set; }

Property Value

Type Description
String

A string value specifying the name of a data field whose values are used for summary calculation.

Remarks

If the GridSummaryItem.SummaryType property value is SummaryItemType.Count, you can leave the FieldName property set to an empty string (or set to any other value). If the GridSummaryItem.SummaryType property value is SummaryItemType.Custom, setting the FieldName property value is optional. If you want to use the GridView.CustomSummaryCalculate event’s CustomSummaryEventArgs.FieldValue parameter, you must initialize the FieldName property with the required field name. If you don’t want to use the this parameter, the FieldName property can be set to any value.

If the GridSummaryItem.SummaryType property is set to SummaryItemType.Min, SummaryItemType.Max, SummaryItemType.Sum or SummaryItemType.Average, the FieldName property must specify the name of a field bound to the column whose values must be used when calculating. Otherwise, no summary will be calculated.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FieldName 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