Skip to main content

How to: Format Values in the Vertical Grid Using Standard Format Strings

The following example demonstrates how to format values in the VerticalGrid’s rows using standard format strings. These are described in the Format Specifiers topic.

Values in the rowPrice row will be formatted as a currency amount. Values in the rowDeliveryDate row will be represented in the Long Date form.

The image below shows the result.

Format - StandardStrings

using DevExpress.Utils;
// ...
rowPrice.Properties.Format.FormatType = FormatType.Numeric;
rowPrice.Properties.Format.FormatString = "c2";
rowDeliveryDate.Properties.Format.FormatType = FormatType.DateTime;
rowDeliveryDate.Properties.Format.FormatString = "D";