wpf-devexpress-dot-xpf-dot-grid-dot-summaryitembase-0056d21b.md
Gets or sets the pattern used to format the summary value. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public string DisplayFormat { get; set; }
Public Property DisplayFormat As String
| Type | Description |
|---|---|
| String |
A String value that specifies the pattern used to format the summary 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]
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.
wpf-data-grid-summarize-empty-cells/CS/CustomSummary_EmptyCells_CodeBehind/MainWindow.xaml#L22
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem DisplayFormat="Total empty cells count: {0}"
FieldName="Number"
wpf-data-grid-process-frequent-data-updates/CS/ChunkAndOptSummariesExample/MainWindow.xaml#L18
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem SummaryType="Count" FieldName="Name" DisplayFormat="Total count: {0:N0}"/>
</dxg:GridControl.TotalSummary>
wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml#L31
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
<dxg:GridSummaryItem SummaryType="Max" FieldName="Created" DisplayFormat="{}Last created: {0}" Alignment="Right"/>
</dxg:GridControl.TotalSummary>
wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L35
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
<dxg:GridSummaryItem SummaryType="Max" FieldName="Created" DisplayFormat="{}Last created: {0}" Alignment="Right"/>
</dxg:GridControl.TotalSummary>
how-to-bind-to-grpc/CS/InfiniteAsyncSource.GRPC/MainWindow.xaml#L51
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
<dxg:GridSummaryItem SummaryType="Max" FieldName="Created" DisplayFormat="{}Last created: {0}" Alignment="Right"/>
</dxg:GridControl.TotalSummary>
See Also