I have an EditorFor template that renders fine inside a Kendo Window but posts an empty (null). ViewModel back when the form is submited.
This only happens when the EditorFor template is rendered inside the Window control. The ViewModel is not empty when the EditorFor is outside of the Window.
Yes, I verified
ListofChoices is an IEnumerable of the Choice ViewModel.
___VIEW_______________________________________________
____EDITOR TEMPLATE___________________________________
This only happens when the EditorFor template is rendered inside the Window control. The ViewModel is not empty when the EditorFor is outside of the Window.
Yes, I verified
@using (Html.BeginForm()) is working correctly.
ListofChoices is an IEnumerable of the Choice ViewModel.
___VIEW_______________________________________________
@(Html.Kendo().Window()
.Name("window")
.Title("Profile:")
.Content(@<
text
>
<
div
>Test</
div
>
@Html.EditorFor(y => y.ListofChoices);
</
text
>)
)
<
button
id
=
"get1"
type
=
"submit"
>CONTINUE</
button
>
____EDITOR TEMPLATE___________________________________
@model ViewModels.Choice
@Html.CheckBoxFor(x=>x.IsSelected)
@Html.HiddenFor(x=>x.AccountResponsibilityId)
@Html.LabelFor(x=>x.IsSelected, Model.AccountResponsibilityName)