Back to Devexpress

TokenEdit.CheckedItems Property

windowsforms-devexpress-dot-xtraeditors-dot-tokenedit-803a36ee.md

latest3.9 KB
Original Source

TokenEdit.CheckedItems Property

Returns the object that contains all currently checked tokens within this TokenEdit.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public TokenEditCheckedItemCollection CheckedItems { get; }
vb
<Browsable(False)>
Public ReadOnly Property CheckedItems As TokenEditCheckedItemCollection

Property Value

TypeDescription
DevExpress.XtraEditors.TokenEditCheckedItemCollection

A DevExpress.XtraEditors.TokenEditCheckedItemCollection object that contains all currently checked tokens within this TokenEdit.

|

Remarks

To check (select) a token within the TokenEdit, and end-user should click its header (or glyph, if the RepositoryItemTokenEdit.DeleteTokenOnGlyphClick property equals DefaultBoolean.False ). Depending on the RepositoryItemTokenEdit.CheckMode property value, the editor can have either one or multiple tokens selected at one time. The CheckedItems collection returns all currently selected (checked) tokens for this editor.

Important

Do not confuse the CheckedItems and TokenEdit.SelectedItems collections. The SelectedItems collection returns all tokens currently visible within the editor, while the CheckedItems collection contains only those tokens currently checked.

The CheckedItems collection is designed only to return checked tokens. Do not manually modify this collection via Add, AddRange, Remove or other methods. Use the TokenEdit.CheckItem and TokenEdit.UncheckItem methods instead.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CheckedItems 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.

winforms-tokenedit-checked-tokens/CS/TokenEdit_Glyph_InEndOfToken/CustomTokenEdit/CustomTokenEdit.cs#L42

csharp
public CustomTokenEditToken CheckedItem { get { return base.CheckedItem as CustomTokenEditToken;} }
public CustomTokenEditCheckedItemCollection CheckedItems { get { return base.CheckedItems as CustomTokenEditCheckedItemCollection; } }
public CustomTokenEditSelectedItemCollection SelectedItems { get { return base.SelectedItems as CustomTokenEditSelectedItemCollection; } }

See Also

SelectedItems

CheckMode

TokenEdit Class

TokenEdit Members

DevExpress.XtraEditors Namespace