setDataSource
Sets the dataSource of an existing MultiColumnComboBox and rebinds it.
Parameters
dataSource kendo.data.DataSource
Example
<input id="multicolumncombobox" />
<script>
$("#multicolumncombobox").kendoMultiColumnComboBox({
dataSource: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" }
],
columns: [
{ field: "name" },
{ field: "id" }
],
dataTextField: "name",
dataValueField: "id",
});
var dataSource = new kendo.data.DataSource({
data: [
{ id: 3, name: "Bananas" },
{ id: 4, name: "Cherries" }
]
});
var multicolumncombobox = $("#multicolumncombobox").data("kendoMultiColumnComboBox");
multicolumncombobox.setDataSource(dataSource);
</script>