RepositoryItemTokenEdit.SelectedItems Property
Gets the collection that contains all tokens currently visible in the TokenEdit.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
DevExpress.XtraEditors.TokenEditSelectedItemCollection | A DevExpress.XtraEditors.TokenEditSelectedItemCollection object that contains all tokens currently visible in the editor. |
Remarks
The SelectedItems object provides zero-based indexed access to all tokens currently displayed within the editor, whether they were chosen from the drop-down list (see the RepositoryItemTokenEdit.ShowDropDown property) or manually entered and transformed into tokens in the RepositoryItemTokenEdit.ValidateToken event. In other words, the SelectedItems property returns the collection of all tokens whose values (TokenEditToken.Value) form the editor’s current EditValue property value.
Same tokens can be also retrieved in an IList structure via the TokenEdit.GetTokenList method.
Important
Do not confuse the SelectedItems property with the RepositoryItemTokenEdit.CheckedItems property, which returns all tokens painted as checked. To check a token, an end-user must click its caption. See this link for details.
The SelectedItems collection is designed only to return checked tokens. Do not manually modify this collection via Add, AddRange, Remove or other methods.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedItems 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.