【发布时间】:2016-04-04 21:45:15
【问题描述】:
所以我继承了一个使用 Telerik 的旧项目,该项目由不再与我公司合作的人制作。显然,Telerik 使用的语法已经改变,我找不到关于在 Telerik 网站上的任何地方为组合框设置 tabindex 的新的、正确的语法的文档,也找不到互联网的其余部分。
我的代码如下:
Html.Telerik().ComboBoxFor(model => model.Customer.AccountExecutive.SalesPersonCode)
.Name("salesRepCombo")
.Value(Model.Customer.AccountExecutive.SalesPersonCode)
.HtmlAttributes(new { style = "width:200px" })
.InputHtmlAttributes(new { tabindex = 5})
.BindTo((IEnumerable<SelectListItem>)ViewData["SalesPeople"])
.Filterable(filtering => filtering.FilterMode(AutoCompleteFilterMode.StartsWith))
.AutoFill(true)
.HighlightFirstMatch(true)
我遇到的问题是“Telerik.Web.Mvc.UI.Fluent.ComboBoxBuilder 不包含'InputHtmlAttributes'的定义”。
由于没有任何来源告诉我正确的方法,我已经尝试使用“HtmlAttributes(new { tabindex = 5})”和“DropDownHtmlAttributes(new { tabindex = 5})”来查看它们是否有效,但两者都没有设置 tabindex。
有谁知道设置tabindex的正确语法,或者有谁知道涵盖该主题的官方文档在哪里??
【问题讨论】:
标签: c# asp.net-mvc telerik tabindex