Skip to main content

GridSummaryItem.GetDisplayText(Object, Boolean) Method

Formats the specified value using the summary item’s format settings.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public virtual string GetDisplayText(
    object value,
    bool fullForm
)

Parameters

Name Type Description
value Object

A Object representing the value to be formatted.

fullForm Boolean

true if the formatted string should contain static text identifying the summary item type; otherwise, false.

Returns

Type Description
String

A string representing the specified value formatted with respect to the summary item’s format settings.

Remarks

The GetDisplayText method formats the specified value using the summary item’s GridSummaryItem.DisplayFormat property value. If this property value is an empty string, the format string used by the GetDisplayText method is returned by the GridSummaryItem.GetDisplayFormatByType method.

Note that if the specified value is formatted using the GridSummaryItem.DisplayFormat property value, the fullForm parameter value is ignored. Otherwise, this parameter value is passed to the GridSummaryItem.GetDisplayFormatByType method to obtain a proper format string.

Please refer to the Working with Summaries in Code. Custom Summaries topic for details on getting summary items’ values and display texts.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetDisplayText(Object, Boolean) method.

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