0
Я пытаюсь заполнить выпадающий список для использования в моей сетке Kendo с помощью Editor Templates.Kendo Editor Templates (Grid)
Мои StatesEditor.cshtml содержит:
@(Html.Kendo().DropDownList()
.Name("State")
.DataValueField("StateID")
.DataTextField("ShortName")
.BindTo((System.Collections.IEnumerable)ViewData["states"]))
В моем контроллере у меня есть:
public ActionResult Index()
{
var db = new ACoreEntities();
db.Configuration.ProxyCreationEnabled = false;
var states = db.StateLookups;
var stateList = states.Select(state => state.ShortName);
ViewData["states"] = stateList;
return View("~/Views/System/PMarkup/Index.cshtml");
}
В моей фактической сетке, когда я нажимаю кнопку «Изменить» для строки я получаю DropDownList который содержит 51 'undefined' записей.
https://kendoeditortemplate.codeplex.com/ –