Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxComboBox<TData, TValue>.EditBoxTemplate Property

Specifies a template used to display the ComboBox’s item in the edit box.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment<TData> EditBoxTemplate { get; set; }

#Property Value

Type Description
RenderFragment<TData>

The template content.

#Remarks

You can use the EditBoxTemplate property to customize the appearance of a ComboBox item displayed in the edit box. It can be the selected item or the focused item when a user tries to select it, but has not submitted this action yet.

Razor
<DxComboBox Data="@Items"
            @bind-Value="@Value">
    <EditBoxTemplate>
        Selected item: @context 
    </EditBoxTemplate>
</DxComboBox>

@code {
    string Value { get; set; } = "Low";
    IEnumerable<string> Items = new List<string>() { "Low", "Normal", "High" };
}
See Also