Class RadzenAutoComplete
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.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenAutoComplete : DataBoundFormComponent<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
  Examples
Basic 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..." />
  Constructors
RadzenAutoComplete()
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.
Declaration
public RadzenAutoComplete()
  Examples
Basic 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..." />
  Fields
list
Gets list element reference.
Declaration
protected ElementReference list
  Field Value
| Type | Description | 
|---|---|
| ElementReference | 
search
Gets search input reference.
Declaration
protected ElementReference search
  Field Value
| Type | Description | 
|---|---|
| ElementReference | 
Properties
FilterDelay
Gets or sets the filter delay.
Declaration
[Parameter]
public int FilterDelay { get; set; }
  Property Value
| Type | Description | 
|---|---|
| int | The filter delay.  | 
      
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IReadOnlyDictionary<string, object> | The attributes.  | 
      
InputType
Gets or sets the underlying input type. This does not apply when Multiline is true.
Declaration
[Parameter]
public string InputType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | The input type.  | 
      
MaxLength
Gets or sets the underlying max length.
Declaration
[Parameter]
public long? MaxLength { get; set; }
  Property Value
| Type | Description | 
|---|---|
| long? | The max length value.  | 
      
MinLength
Gets or sets the minimum length.
Declaration
[Parameter]
public int MinLength { get; set; }
  Property Value
| Type | Description | 
|---|---|
| int | The minimum length.  | 
      
Multiline
Gets or sets a value indicating whether this RadzenAutoComplete is multiline.
Declaration
[Parameter]
public bool Multiline { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
  | 
      
OpenOnFocus
Gets or sets a value indicating whether popup should open on focus. Set to false by default.
Declaration
[Parameter]
public bool OpenOnFocus { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
  | 
      
PopupStyle
Gets or sets the Popup height.
Declaration
[Parameter]
public string PopupStyle { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | The number Popup height.  | 
      
Query
Gets the IQueryable.
Declaration
protected override IQueryable Query { get; }
  Property Value
| Type | Description | 
|---|---|
| IQueryable | The IQueryable.  | 
      
Overrides
SelectedItem
Gets or sets the selected item.
Declaration
[Parameter]
public object SelectedItem { get; set; }
  Property Value
| Type | Description | 
|---|---|
| object | The selected item.  | 
      
SelectedItemChanged
Gets or sets the selected item changed.
Declaration
[Parameter]
public EventCallback<object> SelectedItemChanged { get; set; }
  Property Value
| Type | Description | 
|---|---|
| EventCallback<object> | The selected item changed.  | 
      
Template
Gets or sets the template.
Declaration
[Parameter]
public RenderFragment<dynamic> Template { get; set; }
  Property Value
| Type | Description | 
|---|---|
| RenderFragment<dynamic> | The template.  | 
      
View
Gets the view - the Query with filtering applied.
Declaration
protected override IEnumerable View { get; }
  Property Value
| Type | Description | 
|---|---|
| IEnumerable | The view.  | 
      
Overrides
Methods
BuildRenderTree(RenderTreeBuilder)
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.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RenderTreeBuilder | __builder | 
Overrides
Dispose()
Disposes this instance.
Declaration
public override void Dispose()
  Overrides
FocusAsync()
Sets the focus on the input element.
Declaration
public override ValueTask FocusAsync()
  Returns
| Type | Description | 
|---|---|
| ValueTask | 
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
  Returns
| Type | Description | 
|---|---|
| string | 
Overrides
OnAfterRenderAsync(bool)
Called on after render asynchronous.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | firstRender | if set to   | 
      
Returns
| Type | Description | 
|---|---|
| Task | Task.  | 
      
Overrides
OnChange(ChangeEventArgs)
Handles the Change event.
Declaration
protected Task OnChange(ChangeEventArgs args)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ChangeEventArgs | args | The ChangeEventArgs instance containing the event data.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | 
OnFilterKeyPress(KeyboardEventArgs)
Handles the FilterKeyPress event.
Declaration
protected Task OnFilterKeyPress(KeyboardEventArgs args)
  Parameters
| Type | Name | Description | 
|---|---|---|
| KeyboardEventArgs | args | The KeyboardEventArgs instance containing the event data.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | 
SetParametersAsync(ParameterView)
Set parameters as an asynchronous operation.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ParameterView | parameters | The parameters.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | A Task representing the asynchronous operation.  |