Skip to main content
A newer version of this page is available. .

TreeListDataColumn.DisplayFormat Property

Gets or sets the formatting applied to column values.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v18.2.dll

Declaration

[DefaultValue("")]
public virtual string DisplayFormat { get; set; }

Property Value

Type Default Description
String String.Empty

A String value that specifies the display format. An empty string to display column values using default formatting.

Remarks

Use the DisplayFormat property to apply formatting to column values, and add any static text to their textual representation. The general pattern for setting the DisplayFormat property value is shown below:

<custom static text>{0<:format specifier<precision specifier> >}<custom static text>

Here, the ‘{0}’ character sequence is the column value’s placeholder. The format specifier sets the formatting type (currency, scientific, etc). The precision specifier sets the number of characters to be displayed after the decimal point.

For instance, if displaying currency values within a column, set the DisplayFormat property to ‘{0:c2}’. If the cell value is 123, the formatted value representation will be ‘$123.00‘.

For details on using format specifiers, see Format Specifiers.

Note

Setting the DisplayFormat property to an empty string applies default cell value formatting.

See Also