New to Kendo UI for jQueryStart a free 30-day trial

Change Placeholder Text after Initialization

Environment

ProductProgress® Kendo UI® ComboBox for jQuery
Product Version2019.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.

javascript
     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