how i get select value from kendo comboBox
var c = $('#MyCombo');
// to get selected id
c.val() // and also
c.data('kendoComboBox').value()
// to get selected text
c.data('kendoComboBox').text()
// to get selected item index
c.data('kendoComboBox').select()
// to set selected item e.g. 3
c.data('kendoComboBox').select(2)
The getters/setters from the kendo comboBox are part of the kendoComboBox 'class'.
You can use this.value() or this.text() depending on what you need.
$("#_FeeScheme_Input").kendoComboBox({
minLength: 1,
filter: 'contains',
dataTextField: "FeeSchemeDescription",
dataValueField: "FeeSchemeID",
dataSource: {
type: "json",
serverFiltering: false,
transport: {
read: "/Qualification/GetAllFeeScheme_JSON"
},
},
change: function(){
alert("value " + this.value());
}
});
You can use jquery too, If you try to take value out of events.
var CB= $("#_FeeScheme_Input").data("kendoComboBox");
var description= CB.dataItem(CB.select()).FeeSchemeDescription; // for text field
alert(description);
var CB= $("#_FeeScheme_Input").data("kendoComboBox");
var Id= CB.dataItem(CB.select()).FeeSchemeID; // for value field
alert(Id);