Tab

ASPxAutoCompleteBoxBase.TextFormatString Property

Specifies a pattern used to display the selected item’s text in multi-column mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

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

Property Value

Type Default Description
String

String.Empty

A format pattern.

Remarks

In multi-column mode, the control’s edit box displays the selected row’s values one by one, separated by a semicolon.

ASPxComboBox-TextFormatString-Default

The TextFormatString property allows you to change the selected item’s output text by a pattern that can contain literals and indexed placeholders such as “{0}”, “{1}”, and so on.

ASPxComboBox-TextFormatString-Default

<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="CustomersDataSource" ValueField="CustomerID"
    TextFormatString="{0} is from {1}">
    <Columns>
        <dx:ListBoxColumn FieldName="ContactName" />
        <dx:ListBoxColumn FieldName="Country" />
    </Columns>
</dx:ASPxComboBox>

You can also use a standard or custom format string to customize the displayed text.
The following table contains the standard format specifiers:

Format specifier

Name

Description

“C”

Currency

A currency value.

“D”

Decimal

Integer digits with an optional negative sign.

“E”

Exponential

Exponential notation.

“F”

Fixed-point

Integral and decimal digits with an optional negative sign.

“G”

General

The most compact of either fixed-point or exponential notation.

“N”

Number

Integral or decimal digits, grou