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

Cascading DropDownList Child not updating

1 Answer 167 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
C
Top achievements
Rank 1
C asked on 21 Sep 2012, 10:20 PM
I have attempted to make my code as close to the example provided in the demos:
http://demos.kendoui.com/web/dropdownlist/cascadingdropdownlist.html

In the demo, when an item is selected from the parent I notice a server call is made to fill child DropDownList.
In my code, when an item is selected from the parent nothing happens. No call to the server is made. What is even stranger is that if I decide to click on the child DropDownList it then decides to make a call to the server. However, when that happens it does not send up the parent's ID as a parameter.

What am I doing wrong? Thoughts on how to debug this?

<div style="float: left; margin-right: 10px">
    <input id="calendars" />
</div>
<div style="float: left; margin-right: 10px">
    <input id="periods" />
</div>
<div class="clearfix"></div>

$(document).ready(function () {
    $("#calendars").kendoDropDownList({
        optionLabel: "Select calendar...",
        dataTextField: "CalendarText",
        dataValueField: "CalendarCode",
        dataSource: {
            type: "json",
            serverFiltering: true,
            transport: {
                read: "http://www.someurl.com/AppName/SomeArea/SomeController/GetCalendars"
            }
        }
    });
 
    var periods = $("#periods").kendoDropDownList({
        autoBind: false,
        cascadeFrom: "calendars",
        optionLabel: "Select period...",
        dataTextField: "PeriodCode",
        dataValueField: "PeriodCode",
        dataSource: {
            type: "json",
            serverFiltering: true,
            transport: {
                read: "http://www.someurl.com/AppName/SomeArea/SomeController/GetPeriods"
            }
        }
    }).data("kendoDropDownList");
});

1 Answer, 1 is accepted

Sort by
0
C
Top achievements
Rank 1
answered on 21 Sep 2012, 10:38 PM
Sigh... I noticed that I posted in the MVC section and not Kendo UI Web section.
Tags
DropDownList
Asked by
C
Top achievements
Rank 1
Answers by
C
Top achievements
Rank 1
Share this question
or