I've got a View rendering an EditorFor of an AgreementSearch object, which in turn has an EditorFor of a BaseEmployeeSearch object since AgreementSearch inherits from BaseEmployeeSearch. The issue is that the EditorFor the BaseEmployeeSearch object has returns with nothing in it.
When used separately the BaseEmployeeSearch objects EditorTemplate works just fine, and if the issue were because of a misname or something I would expect the object's .ToString editor to come up by default.
Could someone shed some light on this?
AgreementSearch Edit Template:
@model TimecardRepository.Models.AgreementsModels.BusinessObject.AgreementSearch
@Html.EditorForModel("_BaseEmployeeSearch")
<h4>HEY THERE!</h4>
<span class="margin_left_2em">
@Html.LabelFor(x => x.AgreementStatus, "Filter by agreement Type: ")
@Html.DropDownListFor(x => x.AgreementStatus, new SelectList(new[]
{
new { desc = "All agreement types", value = "0" },
new { desc = "Disagreements Only", value = "1" },
new { desc = "Agreements Only", value = "2" },
new { desc = "Awaiting Agreement", value = "3" }
}, "value", "desc", (Model != null) ? Model.AgreementStatus : 0))
</span>
<span class="margin_left_2em">
@Html.LabelFor(x => x.AgreementStatus, "Filter by last comment: ")
@Html.DropDownListFor(x => x.AgreementStatus, new SelectList(new[]
{
new { desc = "All comment types", value = "0" },
new { desc = "No comments", value = "1" },
new { desc = "Last comment from Payroll", value = "2" },
new { desc = "Last comment from Field", value = "3" }
}, "value", "desc", (Model != null) ? Model.CommentStatus : 0))
</span>
BaseEmployeeSearch Edit Template
@model TimecardRepository.Models.Shared.BaseEmployeeSearch
<span>
@Html.LabelFor(model => Model.FirstName, "First: ")
@Html.TextBoxFor(model => Model.FirstName, new { style = "width: 7em;", maxlength = "12" })
</span>
<span class="margin_left_2em">
@Html.LabelFor(model => Model.LastName, "Last: ")
@Html.TextBoxFor(model => Model.LastName, new { style = "width: 7em;", maxlength = "12" })
</span>
<span class="margin_left_2em">
@Html.LabelFor(model => Model.MemberID, "SMID: ")
@Html.TextBoxFor(model => Model.MemberID, new { style = "width: 6em;", maxlength = "7" })
</span>
<span class="margin_left_2em">
@Html.LabelFor(model => Model.Entity, "Entity: ")
@Html.TextBoxFor(model => Model.Entity, new { style = "width: 5em;", maxlength = "6" })
</span>
<span class="margin_left_2em">
@Html.LabelFor(model => Model.PayPeriod.Offset, "Pay Period: ")
@Html.DropDownListFor(model => Model.PayPeriod.Offset, new SelectList(new[] { new { desc = "Current", value = "0" }, new { desc = "Next", value = "1" }, new { desc = "Previous", value = "-1" } }, "value", "desc"))
@Html.HiddenFor(model => Model.PayPeriod.StartDate)
@Html.HiddenFor(model => Model.PayPeriod.EndDate)
</span>