An autocomplete text input component that provides real-time suggestions as users type based on a data source. RadzenAutoComplete combines a text input with a suggestion dropdown that filters and displays matching items, enabling quick selection without typing complete values. Features configurable filter operators (Contains, StartsWith, etc.) and case sensitivity, binding to any IEnumerable data source with TextProperty to specify display field, MinLength to require typing before showing suggestions, FilterDelay for debouncing, custom templates for rendering suggestion items, LoadData event for on-demand server-side filtering, textarea-style multiline input support, and option to show all items when field gains focus. Unlike dropdown, allows free-text entry and suggests matching items. The Value is the entered text, while SelectedItem provides access to the selected data object.
DataBoundFormComponent<string>.OnDataChanged
DataBoundFormComponent<string>.GetValue
DataBoundFormComponent<string>.GetClassList
DataBoundFormComponent<string>.OnContextMenu
DataBoundFormComponent<string>.TabIndex
DataBoundFormComponent<string>.FilterCaseSensitivity
DataBoundFormComponent<string>.FilterOperator
DataBoundFormComponent<string>.Name
DataBoundFormComponent<string>.Placeholder
DataBoundFormComponent<string>.Disabled
DataBoundFormComponent<string>.Change
DataBoundFormComponent<string>.LoadData
DataBoundFormComponent<string>.Form
DataBoundFormComponent<string>.Value
DataBoundFormComponent<string>.ValueChanged
DataBoundFormComponent<string>.IsBound
DataBoundFormComponent<string>.HasValue
DataBoundFormComponent<string>.TextProperty
DataBoundFormComponent<string>.Data
DataBoundFormComponent<string>.SearchText
DataBoundFormComponent<string>.SearchTextChanged
DataBoundFormComponent<string>.EditContext
DataBoundFormComponent<string>.FieldIdentifier
DataBoundFormComponent<string>.ValueExpression
DataBoundFormComponent<string>.FormFieldContext
DataBoundFormComponent<string>.CurrentPlaceholder
DataBoundFormComponent<string>._view
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenAutoComplete : DataBoundFormComponent<string>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponentBasic autocomplete:
<RadzenAutoComplete @bind-Value=@customerName Data=@customers TextProperty="CompanyName" />
Autocomplete with custom filtering and delay:
<RadzenAutoComplete @bind-Value=@search Data=@products TextProperty="ProductName"
FilterOperator="StringFilterOperator.Contains" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
MinLength="2" FilterDelay="300" Placeholder="Type to search products..." />An autocomplete text input component that provides real-time suggestions as users type based on a data source. RadzenAutoComplete combines a text input with a suggestion dropdown that filters and displays matching items, enabling quick selection without typing complete values. Features configurable filter operators (Contains, StartsWith, etc.) and case sensitivity, binding to any IEnumerable data source with TextProperty to specify display field, MinLength to require typing before showing suggestions, FilterDelay for debouncing, custom templates for rendering suggestion items, LoadData event for on-demand server-side filtering, textarea-style multiline input support, and option to show all items when field gains focus. Unlike dropdown, allows free-text entry and suggests matching items. The Value is the entered text, while SelectedItem provides access to the selected data object.
public RadzenAutoComplete()Gets or sets the filter delay.
public int FilterDelay { get; set; }
| Type | Description |
|---|---|
| int | Gets or sets the filter delay. |
Specifies additional custom attributes that will be rendered by the input.
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> | Specifies additional custom attributes that will be rendered by the input. |
Gets or sets the underlying input type. This does not apply when Multiline is true.
public string InputType { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the underlying input type. This does not apply when Multiline is true. |
Gets or sets the underlying max length.
public long? MaxLength { get; set; }
| Type | Description |
|---|---|
| long? | Gets or sets the underlying max length. |
Gets or sets the minimum length.
public int MinLength { get; set; }
| Type | Description |
|---|---|
| int | Gets or sets the minimum length. |
Gets or sets a value indicating whether this RadzenAutoComplete is multiline.
public bool Multiline { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether this RadzenAutoComplete is multiline. |
Gets or sets a value indicating whether popup should open on focus. Set to false by default.
public bool OpenOnFocus { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether popup should open on focus. Set to false by default. |
Gets or sets the Popup height.
public string PopupStyle { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the Popup height. |
Gets the IQueryable.
protected IQueryable Query { get; }
| Type | Description |
|---|---|
| IQueryable | Gets the IQueryable. |
Gets or sets the selected item.
public object SelectedItem { get; set; }
| Type | Description |
|---|---|
| object | Gets or sets the selected item. |
Gets or sets the selected item changed.
public EventCallback<object> SelectedItemChanged { get; set; }
| Type | Description |
|---|---|
| EventCallback<object> | Gets or sets the selected item changed. |
Gets or sets the template.
public RenderFragment<object> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<object> | Gets or sets the template. |
Gets the view - the Query with filtering applied.
protected Collections.IEnumerable View { get; }
| Type | Description |
|---|---|
| Collections.IEnumerable | Gets the view - the Query with filtering applied. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
Sets the focus on the input element.
public override ValueTask FocusAsync()
| Type | Description |
|---|---|
| ValueTask |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
Called on after render asynchronous.
protected override Task OnAfterRenderAsync(bool firstRender)
| Type | Name | Description |
|---|---|---|
| bool | firstRender | if set to true is first render. |
| Type | Description |
|---|---|
| Task | Task. |
Handles the Change event.
protected Task OnChange(ChangeEventArgs args)
| Type | Name | Description |
|---|---|---|
| ChangeEventArgs | args | The ChangeEventArgs instance containing the event data. |
| Type | Description |
|---|---|
| Task |
Handles the FilterKeyPress event.
protected Task OnFilterKeyPress(KeyboardEventArgs args)
| Type | Name | Description |
|---|---|---|
| KeyboardEventArgs | args | The KeyboardEventArgs instance containing the event data. |
| Type | Description |
|---|---|
| Task |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |