Back to Devexpress

ASPxSummaryItemBase.ValueDisplayFormat Property

aspnet-devexpress-dot-web-dot-aspxsummaryitembase-c96bca0a.md

latest2.5 KB
Original Source

ASPxSummaryItemBase.ValueDisplayFormat Property

Gets or sets the pattern specifying the display format for the calculated summary value.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string ValueDisplayFormat { get; set; }
vb
<DefaultValue("")>
Public Property ValueDisplayFormat As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the format pattern.

|

Remarks

Use the ValueDisplayFormat property to format the calculated summary value.

The summary value pattern can include static text plus a predefined placeholder. The {0} character sequence is the placeholder for the calculated summary value.

Note

The ValueDisplayFormat property’s value is ignored if the ASPxSummaryItemBase.DisplayFormat is explicitly defined.

Example

To display currency values, you can set the ValueDisplayFormat property to ‘{0:c2}’. If the summary value is 100 and the summary type is Min, its formatted equivalent will be ‘Min= $100.00’.

aspx
<dx:ASPxCardViewSummaryItem FieldName="Total" SummaryType="Sum" ValueDisplayFormat="<b>{0:c}</b>"/>

See Also

DisplayFormat

Card View

Online Demo: Grid - Grid Totals

Grid View

Vertical Grid

Online Demo: Vertical Grid - Total Summary

ASPxSummaryItemBase Class

ASPxSummaryItemBase Members

DevExpress.Web Namespace