当我引用kendo multiselect小部件时,我得到以下异常。
'Kendo.Mvc.UI.Fluent.WidgetFactory'不包含'MultiSelect'的定义,并且没有扩展方法'MultiSelect'接受类型为'Kendo.Mvc.UI.Fluent.WidgetFactory'的第一个参数' (您是否缺少using指令或程序集引用?)
如何添加对此窗口小部件的引用?
答案 0 :(得分:0)
你看过Multiselect演示了吗?其他小部件有用吗?您是否按照Getting Started部分中的步骤验证了安装是否正常?
以下代码在使用Razor视图引擎的MVC4视图中工作(它从演示中解除,但没有多余的漂亮的东西和标签):
@(Html.Kendo().MultiSelect()
.Name("required")
.Placeholder("Select attendees...")
.BindTo(new List<string>() {
"Steven White",
"Nancy King",
"Anne King",
"Nancy Davolio",
"Robert Davolio",
"Michael Leverling",
"Andrew Callahan",
"Michael Suyama",
"Anne King",
"Laura Peacock",
"Robert Fuller",
"Janet White",
"Nancy Leverling",
"Robert Buchanan",
"Andrew Fuller",
"Anne Davolio",
"Andrew Suyama",
"Nige Buchanan",
"Laura Fuller"
})
.Value(new string[] { "Anne King", "Andrew Fuller" })
)