DxTagBox<TData, TValue>.Tags Property
Specifies strings (tags) displayed within the TagBox edit box.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public IEnumerable<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<String> | An IEnumerable<T> collection that stores textual representations of the editor’s values. |
Remarks
The Tags
property provides access to the <DxTagBox>
edit box’s strings. The collection contains textual presentations of the selected data items (Values) and custom tags (if AllowCustomTags is set to true
).
To handle changes to the Tags
collection, use the TagsChanged event.
<DxTagBox Data="@Cities"
NullText="Select city..."
TData="string"
TValue="string"
AllowCustomTags="true"
@bind-Tags="@Tags"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"/>
@code {
IEnumerable<string> Cities { get; set; } = new List<string>() {
"London",
"Berlin",
"Paris"
};
IEnumerable<string> Tags { get; set; } = new List<string>() {
"London",
"New York"
};
}
If the value of the Tags
collection’s item is equal to a TagBox drop-down window’s item, the corresponding item is hidden from the list. To display and automatically select the item in the drop-down list, set the HideSelectedItems property to false
.