I am attempting to use a Kendo UI Window modal to edit an IList<T> and it is posting back NULL in the controller. I found a fairly old posts here from 2012 but was wondering if anyone has a newer solution or if there are any other alternatives?
Main View:
@using (Html.BeginForm()){ @(Html.Kendo().Window() .Name("seg_locations_modal") .Title("Other Locations") .Content(@<TEXT> <div id="modal-content" class="split-sub-content-container" style="width:480px;"> <ul> @Html.EditorFor(x => x.Locations) </ul> </div> <div class="form-submit-container" style="width:480px; margin:0;"> <p><button id="add-location" type="button" name="add-location" title="Close">Add Location</button></p> <p><button id="close-modal" type="button" name="close-modal" title="Close">Close Window</button></p> </div> </TEXT>) .Width(500) .Height(500) .Draggable(true) .Modal(true) .Visible(false) )}EditorTemplate:
@model ReMemberMvc.Data.Model.Locations@{ Layout = null;}<li class="locations-row"> <div data-locationsid="@Model.LocationsId" data-locationsseq="@Model.Seq"> @Html.HiddenFor(x => x.LocationsId) @Html.HiddenFor(x => x.Seq) <span class="locations-description-column">@(Html.Kendo().TextBoxFor(x => x.Description).HtmlAttributes(new { style = "width:301px;", placeholder = "Bridgewater, NJ" }))</span> <span class="locations-employeerange-column">@(Html.Kendo().DropDownListFor(x => x.EmployeeRangeId).OptionLabel("Not Provided").DataTextField("Description").DataValueField("EmployeeRangeId").DataSource(source => { source.Read(read => { read.Action("GetEmployeeRangeList", "SelectLists"); }); }))</span> </div></li>ViewModel:
using ReMemberMvc.Data.Model;using System.Collections.Generic;namespace ReMemberMvc.Data.ViewModels{ public class SegApplicationViewModel { public virtual SegApplication SegApplication { get; set; } public virtual IList<Locations> Locations { get; set; } }}Thank you in advance.
