Skip to content Skip to sidebar Skip to footer

How To Get Value From Kendo Combobox

How can I get from kendo combobox value? I always getting undefined on it.. I've used these variants, but they are not worked for me var selected = $('#typesCombo').data('kendoCom

Solution 1:

You forget use # before id. Try following:

var selected = $("#typesCombo").data('kendoComboBox').value()

Solution 2:

There are many ways to get the widget selected value. If you are trying to get the value after it initialization and it has no selected value(declared in the index parameter) you will get an empty value. If you want to get the value when user changes it, you can use the select event and get the value like this:

$("#typesCombo").data('kendoComboBox').value(); // The selected value itself
$("#typesCombo").data('kendoComboBox').dataItem(); // The selected entire dataItem object
$("#typesCombo").val(); // Only if the target element is an input element

Working demo

Solution 3:

varobject= $("#typesCombo").data('kendoComboBox').dataItem() // For getting the selected object

Post a Comment for "How To Get Value From Kendo Combobox"