Skip to main content
Tab

ASPxSummaryItemBase.DisplayFormat Property

Gets or sets the pattern specifying the display format for the summary item.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public virtual string DisplayFormat { get; set; }

Property Value

Type Default Description
String String.Empty

A String value that specifies the format pattern.

Remarks

Use the DisplayFormat property to format the summary display text.

The summary pattern can include static text plus predefined indexed placeholders.

  • The {0} format item is the placeholder for the calculated summary value.
<dx:ASPxSummaryItem FieldName="amount" ShowInGroupFooterColumn ="amount" SummaryType="Sum"  DisplayFormat="My Caption: {0}"/>
  • The {1} format item is the placeholder for the caption of the column (row for ASPxVerticalGrid) whose values the current summary aggregates.

In the following example, if the “Price” column’s summary value is 100, its formatted equivalent will be ‘Total of Price: $100.00’.

<dx:ASPxSummaryItem FieldName="amount" ShowInGroupFooterColumn ="amount" SummaryType="Sum"  DisplayFormat="Total of {1}: {0:c2}"/>

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