I have a kendo grid that has editor template for the popup editor. Whenever I call a property directly on the model i.e. @Html.DropDownListFor(model=>model.MyProperty,SomeSelectList) everything Works fine. When I do associated properties on the other hand I get the no parameterless constructor. All of my associated properties specifically have a default constructor. So why am I getting this error when I use @Html.DropDownLIstFor(model=>model.AssociatedPropertyObject.AssociatedPropertyProperty) when both the model and the associatedproperty object have default constructors specified.
This is how my models are set up.
This is how my models are set up.
01.
public class MyClass
02.
{
03.
public MyClass()
04.
{
05.
AssociatedObject=new AssociatedObject();
06.
}
07.
public AssociatedObject AssociatedObject
08.
{get; set;}
09.
}
10.
public class AssociatedObject
11.
{
12.
public AssociatedObject()
13.
{
14.
//do something
15.
}
16.
}