Back to Devexpress

TokenEdit.RemoveItem(Object) Method

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

latest1.9 KB
Original Source

TokenEdit.RemoveItem(Object) Method

Hides a token with the specified value from the TokenEdit control’s textbox.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Parameters

NameTypeDescription
valueObject

An Object that is the value of the token that will be hidden.

|

Remarks

This operation removes the specified token from the TokenEdit.SelectedItems collection. Note that the hidden token stays within the control’s RepositoryItemTokenEdit.Tokens collection.

The code sample below illustrates how to hide a token with the February value.

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

See Also

SelectedItems

TokenEdit Class

TokenEdit Members

DevExpress.XtraEditors Namespace