select
Fired when an item from the popup is selected by the user either with mouse/tap or with keyboard navigation.
Important: The event is not fired when an item is selected programmatically.
Event Data
e.dataItem Object
The data item instance of the selected item.
e.item jQuery
The jQuery object which represents the selected item.
e.preventDefault Function
If invoked prevents the select action. The widget will retain the previous selected item.
e.sender kendo.ui.MultiColumnComboBox
The widget instance which fired the event.
Example - subscribe to the "select" event during initialization
<input id="multicolumncombobox" />
<script>
$("#multicolumncombobox").kendoMultiColumnComboBox({
dataSource: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" }
],
columns: [
{ field: "name" },
{ field: "id" }
],
dataTextField: "name",
dataValueField: "id",
select: function(e) {
var item = e.item;
var text = item.text();
// Use the selected item or its text
}
});
</script>
Example - subscribe to the "select" event after initialization
<input id="multicolumncombobox" />
<script>
function multicolumncombobox_select(e) {
var item = e.item;
var text = item.text();
// Use the selected item or its text
}
$("#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.bind("select", multicolumncombobox_select);
</script>
Example - prevent the item selection
<input id="multicolumncombobox" />
<script>
$("#multicolumncombobox").kendoMultiColumnComboBox({
dataSource: [
{ id: 1, name: "Apples" },
{ id: 2, name: "Oranges" }
],
columns: [
{ field: "name" },
{ field: "id" }
],
dataTextField: "name",
dataValueField: "id",
select: function(e) {
//call preventDefault() to prevent the selection
e.preventDefault();
}
});
</script>