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

ASPxTokenBox Class

The token box editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll


public class ASPxTokenBox :


The ASPxTokenBox editor provides the capability to auto complete tokens from a predefined list.


The ASPxTokenBox offers the following features:

  • The editor’s items can be generated dynamically by binding the editor to a data source, as well as manually populating the control’s item collection.
  • You can provide your end-users with the capability to filter list items dynamically, based upon the text typed in the editor’s input area on the client side (find-as-you-type filtering).
  • You can restrict the available tokens to the item collection, or allow end-user to provide custom tokens.
  • You can use the ASPxTokenBox for editing column values in the ASPxGridView and ASPxTreeList controls.

When the ASPxEditor gets focus, the drop down window can be displayed on the ASPxTokenBox.ShowDropDownOnFocus property. The drop-down displays items that are contained in the ASPxAutoCompleteBoxBase.Items collection. The collection can be populated manually or by binding to a data source. End-users can select items from the drop down window or type them manually. If the ASPxTokenBox.AllowCustomTokens property is set to true, end-users can type custom tokens, i.e., tokens that have no corresponding items in the ASPxAutoCompleteBoxBase.Items collection.

The editor items can be filtered if it is allowed by the ASPxAutoCompleteBoxBase.IncrementalFilteringMode property.

The collection of tokens is accessible by the ASPxTokenBox.Tokens property. Note that tokens in the collection must be unique, so adding a token with text which is already contained in the collection does nothing.


  • The ItemValueType property values should be equal to the item’s value type (string, by default).

  • Starting with v19.1.4, add a custom token to the item collection before you add this item to the Tokens collection.

See Also