Hello, I'm trying to use the cascading combobox depicted in this demo in an MVC app
http://demos.telerik.com/kendo-ui/combobox/cascadingcombobox
everything seems to be working fine locally, but when i try to access the page from a different machine, the second drop down doesn't populate , it throws a 500 internal server error. Here is how i have it set up in my cshtml file and controller action. Could you please point me in the right direction. Thanks!
@Html.Kendo().ComboBox().Name("ddlService").Filter(FilterType.StartsWith).BindTo(new SelectList(Model.Services, "Value", "Text")).DataTextField("Text").DataValueField("Value").HtmlAttributes(new { style = string.Format("width:{0}px", 250) })@Html.Kendo().ComboBox().Name("Ruleset").AutoBind(false).Enable(false).CascadeFrom("ddlService").DataTextField("Name").DataValueField("ID").Placeholder("Select Ruleset...").DataSource(source => { source.Read(read => { read.Action("Ruleset", "Rule").Data("filterRulesets"); }).ServerFiltering(true); }).Events(e => { e.Change("onRulesetChange"); })
function filterRulesets() { return { ruletypeId: $("#ddlService").val() }; }
public JsonResult Ruleset(string ruletypeId) { List<RulesetModel> rulesetList = new List<RulesetModel>(); IEnumerable<Ruleset> lstRuleset = rulesetRepository.GetRulesetsByType(ruletypeId); foreach (Ruleset ruleset in lstRuleset) { RulesetModel rm = Mapper.Map<RulesetModel>(ruleset); rulesetList.Add(rm); } return Json(rulesetList.Select(r => new { ID = r.RulesetId, Name=r.RulesetName}), JsonRequestBehavior.AllowGet); }