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

How to: Format a Column's Numeric Values as Currency

The following example shows how to use the standard format specifiers in a column that displays numeric values. The column’s format string is set to “c2”. This indicates that a value will be formatted as a currency amount with two digits to the right of the decimal point.

The following image shows the result:

FormattedColumnCurrency1

For information on format specifiers, refer to the Format Specifiers topic.

treeList1.Columns["Currency"].Format.FormatType = DevExpress.Utils.FormatType.Numeric;
treeList1.Columns["Currency"].Format.FormatString = "c2";