Tab

ASPxSummaryItemBase.DisplayFormat Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue("")]
public virtual string DisplayFormat { get; set; }
<DefaultValue("")>
Public Overridable Property DisplayFormat As String

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}"/>
See Also