Disable noDataTemplate in AutoComplete, MultiSelect, ComboBox, and DropDownList for MVC

Environment

Product Progress Kendo UI AutoComplete

Description

The .NoDataTemplate method of the ASP.NET MVC wrappers for the dropdown widgets—AutoComplete, MultiSelect, ComboBox, and DropDownList—accepts only strings as parameters. As a result, the template is not displayed.

Solution

Disable noDataTemplate by setting the noDataTemplate option of the wrapped widget to false after the wrapped widget is initialized.

<script>
$(document).ready(function () {
    var autocomplete = $("#autocomplete").data("kendoAutoComplete");
    autocomplete.setOptions({ noDataTemplate: false });
});
</script>
In this article
Not finding the help you need? Improve this article