Autocomplete

The dxAutocomplete widget is a textbox that provides suggestions while a user types into it.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js
Autocomplete interactive configuration
Copy Code
Copy to Codepen
$("#autocomplete").dxAutocomplete({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxAutocomplete jQuery plug-in.

    HTML
    <div id="autoComplete"></div>
    JavaScript
    $("#actionSheet").dxAutocomplete({
        dataSource: autoCompleteData,
        placeholder: 'Type country name',
        valueExpr: 'name'
    });
  • Knockout
    Add a div element and apply the dxAutocomplete binding to this element.

    HTML
    <div data-bind="dxAutocomplete: {
        dataSource: autoCompleteData,
        placeholder: 'Type country name',
        valueExpr: 'name'
    }"></div>
  • AngularJS
    Add a div element and apply the dx-autocomplete directive to this element.

    HTML
    <div dx-autocomplete="{
        dataSource: autoCompleteData,
        placeholder: 'Type country name',
        valueExpr: 'name'
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

The dxAutocomplete widget supports common Collection Container and Editor widget functionality. You can find detailed information on principles of working with the widget in the dxAutocomplete section of the Editor Widgets article. For the information on using Collection Container functionality refer to the Collection Container Widgets guide.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxAutocomplete widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events fired by this widget.

Default Item Template

This section lists the data source fields that are used in a default item template.

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also