StyledColumn FormatMask

The StyledColumn has a property FormatMask which can be used to customise the output of a table at run-time. The output value is generated using the string.Format function in the .NET Framework over the FormatMask. As such, the FormatMask can be any valid format mask that is used in general coding. The .NET Framework SDK includes a page of the available types for formatting and their standard format strings at Formatting Types

Just as a quick lookup for people:

Numeric string formatting:
Format specifier Name Description
C or c Currency The number is converted to a string that represents a currency amount. The conversion is controlled by the currency format information of the NumberFormatInfo object used to format the number. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default currency precision given by the NumberFormatInfo is used.
D or d decimal This format is supported for integral types only. The number is converted to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative. The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier.
N or n number The number is converted to a string of the form "-d,ddd,ddd.ddd...", where each 'd' indicates a digit (0-9). The string starts with a minus sign if the number is negative. Thousand separators are inserted between each group of three digits to the left of the decimal point. The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision given by the NumberFormatInfo is used.

DateTime string formatting:
Format specifier Name Description
d Short Date Pattern Displays a pattern defined by the DateTimeFormatInfo.ShortDatePattern property associated with the current thread or by a specified format provider.
D Long Date Pattern Displays a pattern defined by the DateTimeFormatInfo.LongDatePattern property associated with the current thread or by a specified format provider.
t Short time Pattern Displays a pattern defined by the DateTimeFormatInfo.ShortTimePattern property associated with the current thread or by a specified format provider.
T Long time Pattern Displays a pattern defined by the DateTimeFormatInfo.LongTimePattern property associated with the current thread or by a specified format provider.

 
SourceForge.net Logo