Skip to main content

AutoCompleteBoxPropertiesBase.TextFormatString Property

Gets or sets the pattern used to format the selected item’s text displayed within the editor’s edit box.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public string TextFormatString { get; set; }

Property Value

Type Default Description
String String.Empty

A string value that is the format pattern.


The TextFormatString property is in effect if the editor is used in multi-column mode. In this mode, the editor’s selected item is represented within the editor’s edit box using a text value whose format is based upon the TextFormatString property’s setting.

By default, the TextFormatString property is set to an empty string. In this case, the selected item is represented within the editor’s text box by the values of all visible columns. The order of column values in the text box directly corresponds to the visible order of columns within the editor’s dropdown window and correlates with the order in which columns are listed within the editor’s ComboBoxProperties.Columns collection. Column values are separated with a default separator represented by a semicolon and white space symbols.


You can use the TextFormatString property to provide a custom format for the selected item’s value displayed within the editor’s edit box. Set the property’s value by using indexed placeholders (such as “{0}”, “{1}”, etc.), which can be combined with fixed literals. Placeholder indexes correspond to positions of visible columns (whose ListBoxColumn.Visible property is not set to false) within the ComboBoxProperties.Columns collection.


You can change the format in which a value is displayed using standard or custom format strings. The table below lists some of typical 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 and decimal digits, group separators, and a decimal separator with an optional negative sign
“P” Percent Number multiplied by 100 and displayed with a percent symbol

If the incremental filtering feature is enabled (the AutoCompleteBoxPropertiesBase.IncrementalFilteringMode property is not set to IncrementalFilteringMode.None), the value typed by the end-user into the edit box is searched within the editor’s list, based upon the TextFormatString property’s defined format.

If the editor’s AutoCompleteBoxPropertiesBase.ValueField property is not defined, the text value formatted using the TextFormatString property is used as the editor’s value.


The TextFormatString property synchronizes its value with the editor’s ASPxAutoCompleteBoxBase.TextFormatString property.

See Also