This is a migrated thread and some comments may be shown as answers.

cascading combobox working locally but not remotely

1 Answer 65 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Phani
Top achievements
Rank 1
Phani asked on 07 Apr 2015, 02:48 PM

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

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Apr 2015, 09:28 AM
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!
 
Tags
ComboBox
Asked by
Phani
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or