Back to Devexpress

DxTagBox<TData, TValue>.TagsChanged Event

blazor-devexpress-dot-blazor-dot-dxtagbox-2-d87af47e.md

latest1.6 KB
Original Source

DxTagBox<TData, TValue>.TagsChanged Event

Fires after the Tags collection changed.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public EventCallback<IEnumerable<string>> TagsChanged { get; set; }

Parameters

TypeDescription
IEnumerable<String>

The new tags collection.

|

Remarks

razor
<DxTagBox Data="@Cities"
          AllowCustomTags="true"
          Tags="@Tags"
          TagsChanged="@TagsChanged"
          @bind-Values="@Values">
</DxTagBox>

@code {
    IEnumerable<string> Tags = new List<string>() {
        "London",
        "New York"
    };

    IEnumerable<string> Cities = new List<string>() {
        "London",
        "Berlin",
        "Paris",
    };

    IEnumerable<string> Values;

    void TagsChanged(IEnumerable<string> newTags) {
        Tags = newTags;
    }
}

You can use the TagsChanging event to validate/cancel the newly selected tags.

See Also

DxTagBox<TData, TValue> Class

DxTagBox<TData, TValue> Members

DevExpress.Blazor Namespace