text
Gets or sets the text of the MultiColumnComboBox. Widget will select the item with same text. If there are no matches then the text will be considered as a custom value of the widget.
Important: When the
autoBind
option is set to false, the widget will update only the selected text. The widget will stay unbound.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="multicolumncombobox" />
<script>
$("#multicolumncombobox").kendoMultiColumnComboBox({
dataSource: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" }
],
columns: [
{ field: "name" },
{ field: "id" }
],
dataTextField: "name",
dataValueField: "id",
});
var multicolumncombobox = $("#multicolumncombobox").data("kendoMultiColumnComboBox");
multicolumncombobox.text("Apples");
multicolumncombobox.trigger("change");
</script>
Parameters
text String
The text to set.
Returns
String
The text of the MultiColumnComboBox.
Example - set text of the widget
<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 multicolumncombobox = $("#multicolumncombobox").data("kendoMultiColumnComboBox");
multicolumncombobox.text("Apples");
</script>