【问题标题】:How Can i get cursor on TextBox Automatically in kendoDropDownList like kendoMultiSelect DropDown如何在 kendoDropDownList 中自动将光标放在文本框上,如 kendoMultiSelect DropDown
【发布时间】:2026-01-09 09:30:02
【问题描述】:

光标 Single DropDown List

        $("#baseServiceScheduleModel_DriverUId").data("kendoDropDownList").enable(true);

*KendoMultiSelect DropDownList * kendoMultiSelect

  $("#baseServiceScheduleModel_HelperUId").data("kendoMultiSelect").enable(true);

【问题讨论】:

    标签: jquery asp.net-mvc kendo-ui kendo-asp.net-mvc


    【解决方案1】:

    你试过这样切换服务器过滤吗? Server filtering

    代码类似于

    @(Html.Kendo().DropDownList()
              .Name("products")
              .DataTextField("ProductName")
              .DataValueField("ProductID")
              .HtmlAttributes(new { style = "width:100%" })
              .Filter("contains")
              .DataSource(source => {
                  source.Read(read =>
                  {
                      read.Action("ServerFiltering_GetProducts", "DropDownList");
                  })
                  .ServerFiltering(true);
              })
        )
    

    【讨论】:

    • 我试过不工作..光标没有自动出现
    • 好的,请在使用 document.activeElement 选择下拉列表后检查文档中当前的活动元素是什么
    • 能否提供下拉列表的完整模板
    最近更新 更多