Here is my View:
Here is the method in my Controller:
What am I doing wrong that this is not being called?
<div class="form-group"> @Html.LabelFor(model => model.locationCode, new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.DropDownListFor(model => model.locationCode, new SelectList(Model.Locations)) @Html.ValidationMessageFor(model => model.locationCode) </div> </div> <div class="form-group"> @Html.LabelFor(model => model.loadType, new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.DropDownListFor(model => model.loadType, new SelectList(Model.LoadTypes)) @Html.ValidationMessageFor(model => model.loadType) </div> </div> <div class="form-group"> @Html.LabelFor(model => model.loadDescrip, new { @class = "control-label col-md-2" }) <div class="col-md-10"> @(Html.Kendo().ComboBox() .Name("loadDescription") .Filter(FilterType.Contains) .DataSource(source => { source.Read(read => { read.Action("GetCascadeDocumentNumbers", "DockDoor") .Data("filterLoadDescription"); }) .ServerFiltering(true); }) .Enable(false) .AutoBind(false) .CascadeFrom("loadType") ) <script> function filterLoadDescription(){ return { locCode: $("#locationCode").val(), loadType: $("#loadType").val(), docNumFilter: $("#loadDescription").data("kendoComboBox").input.val() }; } </script> @Html.ValidationMessageFor(model => model.loadDescrip) </div> </div>Here is the method in my Controller:
public JsonResult GetCascadeDocumentNumbers(string locCode, string loadType, string docNumFilter) { var docNums = db.GetCurrentDocumentNumbers(locCode, loadType).AsQueryable(); if (!string.IsNullOrWhiteSpace(docNumFilter)) { docNums = docNums.Where(x => x.Contains(docNumFilter)); } return Json(docNums.Select(x => new {DocCode = x}), JsonRequestBehavior.AllowGet); }What am I doing wrong that this is not being called?