Skip to main content

How to: Format Column Values Using Standard Format Strings

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

This example shows how to format column values using the standard format strings. Values in the Price column are formatted as a currency amount, values in the Date column are formatted using the Short Date Pattern.

GridColumn_DisplayFormat

<dxGrid:GridControl.Columns>
    <!-- ... -->
    <dxGrid:NumberColumn FieldName="Price" DisplayFormat="c2"/>
    <dxGrid:DateColumn FieldName="Date" DisplayFormat="d"/>
    <!-- ... -->
</dxGrid:GridControl.Columns>