我正在使用为 Kendo UI 启用的 Visual Studio 2012 Internet 应用程序。这是一个 MVC4 C# 和 Razor View 项目。
我有超过 6 个模型,我最终将与这些下拉列表级联
我一直在逐步遵循教程(实际上是复制它并在代码中重命名)。
当页面加载 UI 看起来很棒,但没有数据绑定到 DropdownLists(/comboboxes)
我真的只专注于第一个 DropDownList atm 至极
<p>
    <label for="clients">Clients:</label>
    @(Html.Kendo().DropDownList()
          .Name("clients")
          .HtmlAttributes(new { style = "width:300px" })
          .OptionLabel("Select Client...")
          .DataTextField("Client")
          .DataValueField("ClientID")
          .DataSource(source => {
               source.Read(read => {
                   read.Action("GetCascadeClients", "ComboBox");
               });
          })
    )
</p>
当代码到达
.DataSource(source => {
               source.Read(read => {
                   read.Action("GetCascadeClients", "ComboBox");
               });
          })
它应该调用此操作,但 此操作不位于此视图的控制器中
public JsonResult GetCascadeClients()
        {
            var Clients = db.Clients.AsQueryable();
            return Json(db.Clients.Select(c => new { ClientID = c.ClientID, Client = c.Client }), JsonRequestBehavior.AllowGet);
        }
我的问题是我做错了什么,它几乎必须是愚蠢的......(是的数据在数据库中,是的在其他控件中它们绑定得很好。)
编辑:认为下面的 2 个下拉框显示文本而顶部的不显示有点奇怪?

此处未命中断点:

我也有这个运行的脚本标签,可能有问题请记住,我只希望填写第一个(如果第一个有效,其余的应该属于)
<script>
$(document).ready(function () {
    var clients = $("#clients").data("kendoDropDownList"),
        countys = $("#countys").data("kendoDropDownList"),
        townShips = $("#townShips").data("kendoDropDownList");
    $("#get").click(function () {
        var clientsInfo = "\nclients: { id: " + clients.value() + ", name: " +  clients.text() + " }",
            countysInfo = "\ncountys: { id: " + countys.value() + ", name: " + countys.text() + " }",
            townShipsInfo = "\ntownShips: { id: " + townShips.value() + ", name: " + townShips.text() + " }";
        alert("Select Tract To Upload:\n" + clientsInfo + countysInfo + townShipsInfo);
    });
});
</script>