value

Gets or sets the value of the widget.

Important: This method does not trigger change event. This could affect MVVM value binding. The model bound to the widget will not be updated. You can overcome this behavior trigerring the change event manually using trigger("change") method.

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete();
var autocomplete = $("#autocomplete").data("kendoAutoComplete");
autocomplete.value("new value");
autocomplete.trigger("change");
</script>

Parameters

value String

The value to set.

Returns

String the value of the widget.

Example - set and get the value of the widget

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [ "Apples", "Oranges" ]
});
var autocomplete = $("#autocomplete").data("kendoAutoComplete");
autocomplete.value("Apples");
var value = autocomplete.value();
console.log(value); // Displays "Apples"
</script>
In this article
Not finding the help you need? Improve this article