Edit this page

setDataSource

Sets the data source of the widget.

Parameters

dataSource kendo.data.DataSource

The data source to which the widget should be bound.

Example

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [ "Apples", "Oranges" ]
});
var dataSource = new kendo.data.DataSource({
  data: [ "Bananas", "Cherries" ]
});
var autocomplete = $("#autocomplete").data("kendoAutoComplete");
autocomplete.setDataSource(dataSource);
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy