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
19.1
18.2
18.1
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - Implement a Custom Operation

All custom operations are configured in the customOperations array. Follow the steps below to declare an operation:

  1. Specify the operation's name.
    The name identifies the operation and is used later in the widget's filter expression in the value option. Specify it using the name option.

  2. Express the operation through DataSource-compatible operations.
    Filtering is implemented using the DataSource which supports only a limited set of filter operations. Use the calculateFilterExpression function to express your custom operation through these DataSource-compatible operations.

  3. Customize the appearance.
    Specify the caption and icon to be used for displaying the operation in the drop-down list. You can also customize the editor using the editorTemplate option and the value's text representation using the customizeText option.

  4. Make the operation available for fields.
    Set the dataTypes option to make the operation available for fields of specific data types. You can also make it available for an individual field by including the operation's name in the field's filterOperations array.

View Demo