I have the following three KendoUI drop-down lists:
@(Html.Kendo().DropDownList() .HtmlAttributes(new { style = "width:auto;height:25px" }) .OptionLabel("Make (any)") .Name("Make") .DataTextField("Name") .DataValueField("MakeId") .DataSource(source => { source.Read(read => { read.Action("GetMakes", "Home"); }) .ServerFiltering(true); }) .SelectedIndex(0) ) @(Html.Kendo().DropDownList() .Name("Model") .HtmlAttributes(new { style = "width:auto;height:25px" }) .OptionLabel("Model (any)") .DataTextField("Name") .DataValueField("ModelId") .DataSource(source => { source.Read(read => { read.Action("GetModels", "Home") .Data("FilterModels"); }) .ServerFiltering(true); }) .Enable(false) .AutoBind(false) .CascadeFrom("Make") ) @(Html.Kendo().DropDownList() .Name("Fuel") .HtmlAttributes(new { style = "width:auto;height:25px" }) .OptionLabel("Fuel type (any)") .DataTextField("Name") .DataValueField("FuelTypeId") .DataSource(source => { source.Read(read => { read.Action("GetFuelTypes", "Home") .Data("FilterFuelTypes"); }) .ServerFiltering(true); }) .Enable(false) .AutoBind(false) )
The moment a user selects a value from Make DropDownList, the DropDownList model is automatically populated using CascadeFrom ().
But now I want to update the Fuel drop-down list when the Make or Model lists are updated, and I found that you can only have one CascadeFrom call.
Any recommendations on how I can achieve this?
source share