"Unhandled exception at line 1362, column 66 in Function code
0x800a1391 - JavaScript runtime error: 'ParameterSet' is undefined."
I'm going to include as little code as possible to demonstrate what things look like:
>>View <<
@(Html.Kendo().Grid<Web.Models.ModelingJobViewModel>()
...
columns.Bound(c => c.ParameterSet).ClientTemplate("#=ParameterSet.Name#");
...
>>View Model <<
public class ModelingJobViewModel
...
[UIHint("ParameterSetEditor")]
public JobParameterSetViewModel ParameterSet {get; set;}
...
>> "Property" view model <<
public class JobParameterSetViewModel
...
public int Id {get; set;}
public string Name {get; set;}
...
>> Controller <<
...
public ActionResult Index()
...
ViewData["parameterSets"] = repo.SelectAll().Select(e=>new DropdownListItem() { Name = e.name, Id = e.Id}).OrderBy(e => e.Name);
...
>> Custom Editor (ParameterSetEditor) <<
@model Web.Models.ModelingJobViewModel
@(Html.Kendo().DropDownListFor(m => m)
//.Name("ParameterSet")
.DataValueField("Id")
.DataTextField("Name")
.BindTo((System.Collections.IEnumerable)ViewData["parameterSets"])
)
The initial view and the edit action buttons work fine. But when "Add" is clicked, I get the error listed above.
It's probably something stupid, but I've spun my wheels long enough and need to throw this out into the forum to see if anyone has an answer. Help!
Thanks in advance!