New to Kendo UI for jQuery? Download free 30-day trial

Change Placeholder Text after Initialization

Environment

Product Progress® Kendo UI® ComboBox for jQuery
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