dataSource kendo.data.DataSource

The data source of the widget. configured via the datasource option.

  • Changes of the data source will be reflected in the widget.
  • Assigning a new data source would have no effect. Use the setDataSource method instead.

Example - add a data item to the data source

<input id="dropdownlist" />
<script>
$("#dropdownlist").kendoDropDownList({
  dataSource: [
    { name: "Apples" },
    { name: "Oranges" }
  ],
  dataTextField: "name",
  dataValueField: "name"
});
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
dropdownlist.dataSource.add({ name: "Appricot" });
dropdownlist.search("A");
</script>
In this article
Not finding the help you need? Improve this article