Lookup

The Lookup is a widget that allows an end user to search for an item in a collection shown in a drop-down menu.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/lookup
Lookup interactive configuration
Copy Code
Copy to Codepen
$("#lookup").dxLookup({
});

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

  • jQuery
    Use the dxLookup jQuery plug-in.

    HTML
    <div id="lookup"></div>
    JavaScript
    $("#lookup").dxLookup({
        dataSource: lookupData,
        displayExpr: 'name',
        title: 'Lookup title',
        searchEnabled: true
    });
  • Knockout
    Add a div element and apply the dxLookup binding to this element.

    HTML
    <div data-bind="dxLookup: {
        dataSource: lookupData,
        displayExpr: 'name',
        title: 'Lookup title',
        searchEnabled: true
    }"></div>
  • AngularJS
    Add a div element and apply the dx-lookup directive to this element.

    HTML
    <div dx-lookup="{
        dataSource: lookupData,
        displayExpr: 'name',
        title: 'Lookup title',
        searchEnabled: true
    }"></div>

Note that DevExtreme widgets require you to link the jQuery library 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 Lookup widget supports common Collection Container, Editor, and Overlay widget functionality. Refer to the Collection Container Widgets, Editor Widgets and Overlay Widgets articles for details on using common functions. For detailed information on working with the Lookup widget, refer to the dxLookup guide.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Lookup widget.

Methods

This section describes 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