Back to Devexpress

TokenEdit.SelectItem(Object) Method

windowsforms-devexpress-dot-xtraeditors-dot-tokenedit-dot-selectitem-x28-system-dot-object-x29.md

latest1.9 KB
Original Source

TokenEdit.SelectItem(Object) Method

Selects an item with specified value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public void SelectItem(
    object value
)
vb
Public Sub SelectItem(
    value As Object
)

Parameters

NameTypeDescription
valueObject

An Object that is the value of the token that should be selected.

|

Remarks

This operation appends a token with specified value to the TokenEdit.SelectedItems collection. You can only add tokens that exist in the RepositoryItemTokenEdit.Tokens collection.

Note

The SelectItem method works in unbound mode only.

The code sample below illustrates how to select a token with the June value.

csharp
tokenEdit.EditValue = "January, February, March, April, May";
tokenEdit.SelectItem("June");
vb
tokenEdit.EditValue = "January, February, March, April, May"
tokenEdit.SelectItem("June")

See Also

SelectedItems

TokenEdit Class

TokenEdit Members

DevExpress.XtraEditors Namespace