I have two dropdowns, the second "cascading" from the first. This works fine except that when the user first goes into the page, the model has the values for the first and second dropdowns (Model.ProgramID and Model.StrategyID). The first dropdown selects the correct item in the list, but the second dropdown (the cascade one) does not automatically select the item equal to the value from the model, it just selects the first item in the list. If I turn cascading "off" and just load them without cascading stuff set, they both get set to the correct selected items in their respective dropdowns based on the values in the model.
<
div
class
=
"form-input-group"
>
<
label
>Program</
label
>
@(Html.Kendo().DropDownList()
.Name("ProgramID")
.DataTextField("Display")
.DataValueField("Value")
.HtmlAttributes(new { style = "width:100%" })
.OptionLabel("Select")
.DataSource(s =>
{
s.Read(r =>
{
r.Action("RemoteDataSource_GetFirmPrograms", "DropDownList", new { userAccountID = Model.UserAccountID, firmID = Model.FirmID });
});
})
.Height(290)
)
</
div
>
<
div
class
=
"form-input-group"
>
<
label
>Strategy</
label
>
@(Html.Kendo().DropDownList()
.Name("StrategyID")
.DataTextField("Display")
.DataValueField("Value")
.HtmlAttributes(new { style = "width:100%" })
.OptionLabel("Select")
.DataSource(s =>
{
s.Read(r =>
{
r.Action("RemoteDataSource_GetFirmStrategies", "DropDownList").Data("filterStrategies");
})
.ServerFiltering(true);
})
.Height(290)
.AutoBind(true)
.CascadeFrom("ProgramID")
)
</
div
>