How to: Format Column Values Using Standard Format Strings

The following code shows how to format column values using the standard format strings. Values in the colPayment column are formatted as a currency amount, values in the colPurchaseDate column are formatted using the Long Date Pattern.

The result is shown below:

Format - StandardStrings

using DevExpress.Utils;
// ...
colPayment.DisplayFormat.FormatType = FormatType.Numeric;
colPayment.DisplayFormat.FormatString = "c2";
colPurchaseDate.DisplayFormat.FormatType = FormatType.DateTime;
colPurchaseDate.DisplayFormat.FormatString = "D";