Server Filtering

The Kendo UI AutoComplete, the ComboBox, the DropDownList, and the MultiSelect support server-side filtering.

Server filtering enables you to display a subset of data - a reduced portion of the whole dataset which is returned from the server. The ComboBox supports server filtering by utilizing the serverFiltering option of the Kendo UI DataSource component.

The approaches for configuring the server filtering functionality of the ComboBox that are demonstrated in this article are identical for configuring the server filtering functionality of the AutoComplete, DropDownList, and MultiSelect widgets.

For runnable examples on server filtering, refer to the following demos:

Getting Started

To configure server filtering for the ComboBox, set the serverFiltering option of the DataSource and define the filter property of the widget. For a runnable example, refer to the demo on server filtering the ComboBox.

To display a subset of data, define a minimum filter length by using the minLength option of the ComboBox. For example, if you set minLength to 3, the ComboBox will not start filtering the dataset until the user enters at least three characters.

When you use server filtering, you can bind the ComboBox only to the selected data item. In this way, you do not need to retrieve the whole dataset when you want to display the selected value or text. This approach boosts the loading time of the widget.

To bind the ComboBox to the selected data item only:

  1. Send the selected value to the server.
  2. Return only the matching data item.
  3. Use the data callback of the DataSource.
    data: function() {
        //the selectedValue is used on the server to filter the source and return only the matching data item
        return {
            selectedValue: $("#[widget id]").data("kendoComboBox").value()
        }
    }

Known Limitations

The server filtering functionality filters only the source. To page and filter the dataset, use virtualization.

See Also

In this article
Not finding the help you need? Improve this article