I am using the kendo multiselect control and I set its value using Jquery. Once I add a kendo window to my form, the Jquery code can't find the multiselect control and it gives an error "Cannot set value of undefined".
<div id="dialog"> @(Html.Kendo().Window() .Name("ActionItemWindow").Title("Add New Author").Visible(false).Modal(true).Width(1000).Draggable(true).Actions(actions => actions.Maximize().Close()).LoadContentFrom("/Author/_AddNewAuthor"))</div>
@(Html.Kendo().MultiSelect().Name("authorsmultiselect").Placeholder("Select author..").MinLength(4).DataSource(source =>{source.Read(read => { read.Action("GetAuthorsList", "Author"); }).ServerFiltering(false);}).DataTextField("Email").DataValueField("ID"))<input id="Button1" type="button" onclick="showActionItemDetails();" value="button" />
<script>function showActionItemDetails() {var multiselect = $("#authorsmultiselect").data("kendoMultiSelect");multiselect.value("1");}</script>
@(Html.Kendo().Window() .Name("ActionItemWindow").Title("Add New Author").Visible(false).Modal(true).Width(1000).Draggable(true).Actions(actions => actions.Maximize().Close()).LoadContentFrom("/Author/_AddNewAuthor"))breaks your page? Meaning that if you remove the selected line of code, the page works as intended? - ChampChris