我的页面上有 5 个级联下拉菜单。我希望他们尝试级联,但如果它不级联 - 优雅地停止尝试或出错。我还希望启用所有组合框,而不是在填充前一个组合框之前禁用。
我尝试在启用的 fluent API 上使用 .Enable(true),但下拉菜单仍然被禁用。知道我该怎么做吗?
<div class="span5">
<div class="control-group">
@Html.Label("Product Types", new { @class = "control-label" })
<div class="controls">
@( Html.Telerik().ComboBox()
.Name("drpProductTypes")
.BindTo(new SelectList(ViewBag.drpProductTypes))
.Placeholder("Select Category...")
.CascadeTo("drpClass1").Enable(true)
)
</div>
<div class="fix"></div>
</div>
<div class="control-group">
@Html.Label("Class 1", new { @class = "control-label" })
<div class="controls">
@( Html.Telerik().ComboBox()
.Name("drpClass1")
.DataBinding(binding => binding.Ajax().Select("_GetDropDownClassOne", "List"))
.Placeholder("Select Class 1...")
.CascadeTo("drpClass2").Enable(true)
)
</div>
<div class="fix"></div>
</div>
<div class="control-group">
@Html.Label("Class 2", new { @class = "control-label" })
<div class="controls">
@( Html.Telerik().ComboBox()
.Name("drpClass2")
.DataBinding(binding => binding.Ajax().Select("_GetDropDownClassTwo", "List"))
.Placeholder("Select Class 2...")
.CascadeTo("drpClass3").Enable(true)
)
</div>
<div class="fix"></div>
</div>
<div class="control-group">
@Html.Label("Class 3", new { @class = "control-label" })
<div class="controls">
@( Html.Telerik().ComboBox()
.Name("drpClass3")
.DataBinding(binding => binding.Ajax().Select("_GetDropDownClassThree", "List"))
.Placeholder("Select Class 3...")
.CascadeTo("drpClass4").Enable(true)
)
</div>
<div class="fix"></div>
</div>
<div class="control-group">
@Html.Label("Class 4", new { @class = "control-label" })
<div class="controls">
@( Html.Telerik().ComboBox()
.Name("drpClass4")
.DataBinding(binding => binding.Ajax().Select("_GetDropDownClassFour", "List"))
.Placeholder("Select Class 4...").Enable(true)
)
</div>
<div class="fix"></div>
</div>
谢谢