RepositoryItemTokenEdit.EditMode Property
Gets or sets whether an end-user can manually enter and validate any desired text within this TokenEdit.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(TokenEditMode.Default)]
[DXCategory("Behavior")]
public TokenEditMode EditMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DevExpress.XtraEditors.TokenEditMode | Default | A DevExpress.XtraEditors.TokenEditMode enumerator value that specifies whether an end-user can manually enter and validate any desired text within this TokenEdit. |
Remarks
Depending on the EditMode property value, the TokenEdit control can operate in either Manual or Token List mode.
- In Manual mode, end-users can manually enter any text that will later be validated in the RepositoryItemTokenEdit.ValidateToken event. If the entered text does not pass this validation, it remains plain text. Otherwise, it is converted into a token. In this mode, the token drop-down list (see the RepositoryItemTokenEdit.ShowDropDown property) is used only as a secondary tool that assists your end-users in entering tokens that were either added previously, or stored in the predefined RepositoryItemTokenEdit.Tokens collection.
- In Token List mode (same as Default value), end-users can only type in tokens stored within the RepositoryItemTokenEdit.Tokens collection. Any text that does not match these stored tokens is automatically deleted. The RepositoryItemTokenEdit.ValidateToken event is never raised, since end-users are allowed to select only pre-defined tokens and no validation is needed.
See the Token Edit Control topic for the details.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.