Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SummaryItemBase.DisplayFormat Property

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

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public string DisplayFormat { get; set; }

#Property Value

Type Description
String

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

#Remarks

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 formating 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 ‘Total: {0:c2}‘. If the summary value is 100, its formatted equivalent will be ‘Total: $100.00‘.

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