Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TokenEditToken Class

The token.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public class TokenEditToken :
    ICloneable

The following members return TokenEditToken objects:

#Remarks

Read the following topic for additional information and examples: Token Edit Control.

#Examples

#Unbound Mode

In unbound mode, the TokenEdit stores tokens in the Properties.Tokens collection. The following example demonstrates how to add unbound tokens in code:

tokenEdit1.Properties.BeginUpdate();
// Token values must be unique.
tokenEdit1.Properties.Tokens.AddToken("Description string A", "value1");
tokenEdit1.Properties.Tokens.AddToken("Description string B", "value2");
// ... add more tokens
tokenEdit1.Properties.EndUpdate();

#Bound Mode

  1. Use the Properties.DataSource property to bind the TokenEdit control to a data source.
  2. Use the Properties.DisplayMember to specify the data field that stores token descriptions.
  3. Use the Properties.ValueMember to specify the field that stores token values. Token values must be unique.
tokenEdit1.Properties.BeginUpdate();
tokenEdit1.Properties.DataSource = queryBindingSource;
tokenEdit1.Properties.DisplayMember = "EmailAddress";
tokenEdit1.Properties.ValueMember = "EmailAddressID";
tokenEdit1.Properties.EndUpdate();

#Inheritance

Object
TokenEditToken
See Also