我有3 DropDownList
。当我从第一个选择值时,第二个工作完美,Kendo自动启用第二个并执行AJAX查询。但是当我从第二个选择值时,第三个DropDownList仍然被禁用。
代码:
<script>
function filterSchemas() {
return { formGroupId: $("#FormGroupName").val() };
}
function filterRootElements() {
return { shemaId: $("#Schemas").val() };
}
</script>
<div class="editor-label">
@Html.LabelFor(e => e.FormGroupName, "Form group")
</div>
<div class="editor-field">
@(Html.Kendo().DropDownListFor(e => e.FormGroupName)
.Name("FormGroupName")
.OptionLabel("Select form group...")
.DataValueField("Id")
.DataTextField("Name")
.Template("#= data.Name # (#= data.Version #)")
.DataSource(dataSource =>
{
dataSource.Read(read => read.Route(RouteConfig.GetFormGroupNames.Name)).ServerFiltering(true);
})
)
</div>
<div class="editor-label">
@Html.LabelFor(e => e.Schema, "Schema")
</div>
<div class="editor-field">
@(Html.Kendo().DropDownListFor(m => m.Schema)
.Name("Schema")
.OptionLabel("Select schema...")
.DataValueField("SchemaId")
.DataTextField("ShemaName")
.DataSource(dataSource =>
{
dataSource.Read(read => read.Route(RouteConfig.FilterFormSchemas.Name).Data("filterSchemas")).ServerFiltering(true);
})
.AutoBind(false)
.Enable(false)
.CascadeFrom("FormGroupName")
)
</div>
<div class="editor-label">
@Html.LabelFor(e => e.Root, "Root element")
</div>
<div class="editor-field">
@(Html.Kendo().DropDownListFor(m => m.Root)
.Name("Root")
.OptionLabel("Select root...")
.DataValueField("RootId")
.DataTextField("RootName")
.DataSource(dataSource =>
{
dataSource.Read(read => read.Route(RouteConfig.FilterFormRootElements.Name).Data("filterRootElements")).ServerFiltering(true);
})
.AutoBind(false)
.Enable(false)
.CascadeFrom("Schema")
)
</div>
有什么建议吗?