Skip to main content

SummaryItemBase.DisplayFormat Property

Gets or sets the pattern used to format the summary value. This is a dependency property.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP("", Handler = "OnSummaryChanged")]
public string DisplayFormat { get; set; }

Property Value

Type Description
String

A String value that specifies the pattern used to format the summary value.

Remarks

The total summary value is displayed below the GridTotalSummaryItem.Caption:

Total Summary caption

The group summary value is displayed at the end of the group summary:

GroupSummaryData Value

Use the DisplayFormat property to format the summary value and add any text to its textual representation. The general pattern is shown below:

[custom static text] {0:[format specifier][precision specifier]} [custom static text]

  • {0}—the summary value’s placeholder.
  • Format specifier—specifies the formatting type (currency, scientific, etc.).
  • Precision specifier—specifies the number of characters displayed after the decimal point.

Example

To display currency values, set the DisplayFormat property to ‘{0:c2}‘. If the summary value is 100, its formatted equivalent will be ‘$100.00‘.

See Also