The code below is within a poup editor when user click the EDIT button in a row of a grid.
I want to handle when autocomplete field changed.
I added .Events(e => e.Change("autocomplete_change")) in the wrapper and add a javascipt function autocomplete_change() after the wrapper
when run it and click one of the edit button in a grid row, I got autocomplete_change is not defined error and the popup will show under the grid without any data.
Is there anyone could help me to let me know how to fix it and what's going on.
thank you very much.
@(Html.Kendo().AutoCompleteFor(model => model.AnswerA)
.Name("AnswerA")
.DataTextField("Answer")
.Placeholder("Type a answer")
.Filter("Contains")
.MinLength(5)
.HtmlAttributes(new { style = "width:100%" })
.Height(520)
.Events(e => e.Change("autocomplete_change"))
.DataSource(source =>
{
source.Read(read =>
{
read.Action("ResponseRead", "Method")
.Data("onAnswerAData");
})
.ServerFiltering(true);
})
)
<script>
function autocomplete_change() {
alter("call ShowAddingAnswerPrompt");
}
</script>