Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridColumn.DisplayFormat Property

Gets or sets the pattern used to format cell values of the column. This is a bindable property.

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

#Declaration

C#
public string DisplayFormat { get; set; }

#Property Value

Type Description
String

The text pattern for cell values.

#Remarks

Use the DisplayFormat property to specify the format for numeric and date/time values displayed in grid columns. To compose format patterns, you can use standard or custom format specifiers. See the following page for more information:

#Example

This example shows how to use standard format strings to format column values.
Format values in the Price column as a currency amount, and use the Short Date Pattern to format values in the Date column.

Column Display Format

<dxg:DataGridView ItemsSource="{Binding Orders}">
    <dxg:DataGridView.Columns>
        <!-- ... -->
        <dxg:NumberColumn FieldName="Price" DisplayFormat="C2"/>
        <dxg:DateColumn FieldName="Date" DisplayFormat="d"/>
        <!-- ... -->
    </dxg:DataGridView.Columns>
</dxg:DataGridView>
See Also