Hi, I'm struggling with something that should be easy, so I hope you can point to something stupid I'm doing wrong.
I have this MultiSelectFor. When I go the GetCertifications method, I am returning the expected number of results, yet the display shows undefined for each one. I'd expect that to happen if the fields were misnamed, but as far as I can tell I'm getting them correctly with the appropriate names.
@(Html.Kendo().MultiSelectFor(m => m.CertificationList)
.DataTextField("CertTitle")
.DataValueField("Id")
.Placeholder("Select Certifications...")
.AutoBind(false)
.MinLength(3)
.Filter(FilterType.Contains)
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCertifications", "DemandForecastInfoSummary");
})
.ServerFiltering(true);
})
)
public ActionResult GetCertifications(string text)
{
if (string.IsNullOrEmpty(text))
{
return Json("", JsonRequestBehavior.AllowGet);
}
var rtnValue = new SelectList( DemandPlanService.GetAllCertifications(text).ToList(),"Id","CertTitle");
return Json(rtnValue, JsonRequestBehavior.AllowGet);
}