I have a grid with an edit template specified and withing that grid I'm trying to use either render partial or renderaction. Both i've gotten to work with the actually editing and adding that is not my problem. The problem is the data for my partial inside my edittemplate is not being populated with data. Here is my edit template.
How do I get my renderpartial or renderaction to work or is there some other way to use partials in kendo edittemplates for grids.
@model <
BaseFormModel
>
@{
Model.Demographics = Model.GetFormDemographics(Model.PlanActivityId, Model.Id, 0);
}
<
div
class
=
"modalContent"
>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<
fieldset
>
<
legend
>Edit Events</
legend
>
<
div
>
<
label
>Month</
label
>
@Html.TextBoxFor(model => model.StartMonth, new { @placeholder = "mm" })/@Html.TextBoxFor(model => model.StartYear, new { @placeholder = "yyyy" })
</
div
>
<
div
>
<
label
>Event Name</
label
>
@Html.TextBoxFor(m => m.FormName)
</
div
>
<
div
>
<
label
>Number of brochures distributed(if applicable)</
label
>
@Html.TextBoxFor(m => m.Count2, new { @maxlength = 3 })
</
div
>
<
div
>
<
label
>Number of attendees</
label
>
@Html.TextBoxFor(m => m.Count, new { @id = "txtNumberOfAttendees" })
</
div
>
<
a
id
=
"autoPopulate"
>Populate based on my county census and number of attendees.</
a
>
<
h2
>Target Demographics</
h2
>
@*@{
Html.RenderAction("GetFormDemographics", "Form", new { planActivityId = ViewBag.PlanActivityId, formId = Model.Id, spUserId = 0 });
}*@
@{
Html.RenderPartial("_PartialDemographicsEditor",model: Model.Demographics);
}
</
fieldset
>
}
</
div
>