Change Placeholder Text after Initialization

Environment

Product ComboBox for ProgressĀ® Kendo UIĀ®
Product Version 2019.2.514

Description

How can I change the placeholder text of a Kendo UI ComboBox after it has already been initialized?

Solution

To set the placeholder text of the Kendo UI ComboBox, refer to its input element and change the placeholder attribute by using jQuery.

     var comboBox = $("#combobox").data("kendoComboBox");
     $(comboBox.input).attr('placeholder', '--select--');

The following example demonstrates the full implementation of the suggested approach.

    <input id="combobox" />
    <script>
      $(document).ready(function () {

        $("#combobox").kendoComboBox({
          placeholder: "Select..."
        });

        var comboBox = $("#combobox").data("kendoComboBox");
        $(comboBox.input).attr('placeholder', '--select--');

      });
    </script>

See Also

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