cascading combobox working locally but not remotely

2 posts, 0 answers
  1. Phani
    Phani avatar
    8 posts
    Member since:
    May 2013

    Posted 07 Apr 2015 Link to this post

    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);
           }

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 09 Apr 2015 Link to this post

    Hello Phani,

    For some reason, your server throws an 500 error. In order to further review the issue, we will need more details about the error. Would it be possible to share the error message? A runnable test project will be of a great assistance too, as it will help us to review the problem locally and follow you up with more details much faster.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top