Skip to main content

RepositoryItemTokenEdit.SelectedItems Property

Gets the collection that contains all tokens currently visible in the TokenEdit.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
public TokenEditSelectedItemCollection SelectedItems { get; }

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.

See Also