I'm attempting to create a series of cascading dropdowns by populating the second one from the first, the third from the second and so on, by using the change function. This works fine the first time a selection is made in each of the DropDownLists, but if I change a selection in the first one after the second DropDownList has been populated, the second DropDownList disappears to never return. Is there a way to accomplish this?
$("#algType").kendoDropDownList({
change: function () {
algType = $("#algType").data("kendoDropDownList").value();
$("#substn").kendoDropDownList({
dataTextField: "Substn",
dataValueField: "SubstnID",
dataSource: substnDataSource,
change: function () {
algType = $("#algType").data("kendoDropDownList").value();
substn = $("#substn").data("kendoDropDownList").value();
$("#devtyp").kendoDropDownList({
dataTextField: "Devtyp",
dataValueField: "DevtypID",
dataSource: devtypDataSource
});
}
});
}
});