All docs
V19.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

jQuery FilterBuilder - lookup

Configures the lookup field.

Type:

Object

Default Value: undefined

Use the lookup field to limit the available filter values.

See Also

allowClearing

Specifies whether a user can nullify the lookup values. Set to true only if your data source accepts null values.

Type:

Boolean

Default Value: false

dataSource

Specifies the lookup data source.

Default Value: undefined

This option accepts one of the following:

If the lookup data source contains objects, specify the valueExpr and displayExpr options in addition to the dataSource.

NOTE
Collections of primitives are not supported if they are loaded from a remote data source by using the DevExtreme.AspNet.Data library API either directly or via a server-side wrapper, as done in the DevExtreme ASP.NET MVC Controls. Reconfigure the remote data source to return collections of objects.

View Demo

displayExpr

Specifies the data field whose values should be displayed.

Type:

String

|

Function

Function parameters:
data:

Object

The current data object.

Default Value: undefined

Set this option to the name of a data field that provides displayed values...

displayExpr: "name"

... or to a function that returns the displayed value:

displayExpr: function(item) {
    // "item" can be null
    return item && 'ID: ' + item.id + ', Name: ' + item.name;
}

Leave this option unspecified or set it to this if the data source contains primitives.

valueExpr

Specifies the data source field whose values should be replaced.

Type:

String

|

Function

Default Value: undefined

This field's values are replaced with the displayExpr field's values.

NOTE
You cannot specify valueExpr as a function when the widget is bound to a remote data source. This is because valueExpr is used in a filter the widget sends to the server when querying data. Functions with custom logic cannot be serialized for this filter.