The ComboBox is done in Razor:
If I use inline javascript, it works:
But if I reference a separate file, I get this error: Uncaught TypeError: Cannot read property 'input' of undefined
How can I get this to work using a separate .js file?
@Html.Kendo().ComboBox()
.Name(id)
.Filter("contains")
.DataTextField("ChoiceValue").DataValueField("ChoiceValue")
.BindTo(inputs.Choices)
.HtmlAttributes(new { @class = classText, data_validation = inputs.Validation })
var
input = $(
'#id'
).data(
'kendoComboBox'
).input;
input.bind({ keyup:
function
() { doStuff(
'test'
); } });
How can I get this to work using a separate .js file?