controller action not firing for cascading dropdown

2 posts, 0 answers
  1. Terence
    Terence  avatar
    5 posts
    Member since:
    May 2012

    Posted 03 Dec 2012 Link to this post

    I have the following dropdown lists declared in my view:

                        <label for="ApplicationName">Application:</label>
                                                    .BindTo(new SelectList(ViewBag.Applications)))
                        <label for="Roles">Roles:</label>
                                                       .DataSource(source =>
                                                           source.Read(read =>
                                                               read.Action("GetRoles", "Membership")
                                                                     .Data("filterRoles").Type(HttpVerbs.Post) ;
                                                        function filterRoles() {
                                                            return {
                                                                ApplicationNames: $("#ApplicationNames").val()

    and my controller action :

        public class MembershipController : Controller
            MembershipModel model = new MembershipModel();

            public JsonResult GetRoles(string ApplicationNames)
                List<String> roles = model.GetRolesForApplication(ApplicationNames);
               return Json(roles);

    but my GetRoles action never fires. Any ideas ?
  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 05 Dec 2012 Link to this post

    Hello Terence,

    The given code snippet looks OK. I will suggest you check the "Cascading DropDownLists" demo part of the examples bundled with the Kendo UI Complete for ASP.NET MVC. You can find it %Install Folder%/ProgramFiles[x86]/Kendo UI for ASP.NET MVC/Examples. It shows how to implement the required functionality. If the problem still persist I will need a repro project in order to investigate the issue locally and advice you further.

    All the best,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top