DxTagBox<TData, TValue>.EditFormat Property
Specifies the pattern used to format tag values.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v23.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public string EditFormat { get; set; }
Property Value
Type | Description |
---|---|
String | The format pattern. |
Remarks
Use the EditFormat
property to format an editor’s tag text. This property allows you to format text of the tags displayed in ordinary (one-column) and multi-column TagBoxes.
Note
When you enable filter mode for a multi-column TagBox, the filter only takes into account data of the columns that are used in the editor’s format pattern.
The code below adds three columns to a TagBox and applies the {1} {2}
format to the component’s tag values. This format specifies that the tag text should include values of the Name (VisibleIndex = 1
) and Surname (VisibleIndex = 2
) columns.
<DxTagBox Data="@Staff.DataSource"
@bind-Values="@SelectedStaff"
EditFormat="{1} {2}">
<DxListEditorColumn FieldName="Id" Width="50px" />
<DxListEditorColumn FieldName="FirstName" Caption="Name"/>
<DxListEditorColumn FieldName="LastName" Caption="Surname"/>
</DxTagBox>
@code {
IEnumerable<Person> SelectedStaff { get; set; } = new List<Person>() { Staff.DataSource[0] };
}
If the EditFormat
property’s value is not specified, the TextFieldName property specifies an editor’s tag text.