I am trying to call a function each time a key is pressed in the textbox of the combobox to update another pulldown box.
Here is my razor code.
@(Html.Kendo().ComboBoxFor(m => m.ToAccountID)
.Name("ToAccountID")
.DataTextField("Text")
.DataValueField("Value")
.HtmlAttributes(new { style = "width:100%;" })
.BindTo(acctList)
.Events(e =>
{
e.Select("onToSelectChange");
})
)
I have tried this but get a javascript error.
// javascript
$("#ToAccountID").data("kendoComboBox").input.keypress(function(){
console.log("pressed");
});
Error:
TypeError: $(...).data(...) is null
<anonymous>
Thanks.