【发布时间】:2014-12-29 08:17:59
【问题描述】:
我在 Html.BeginForm 中使用剑道 dropDownList。问题是我只能获得在我的情况下是 Id 的 DataValueField。为什么我没有得到对象(DataTextField+DataValueField?)
这是我的下拉菜单:
@(Html.Kendo().DropDownListFor(p => p.Company)
.OptionLabel(" ")
.DataTextField("ComapnyName")
.DataValueField("Id")
.Filter("contains")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCompanies", "ReportSingleUser");
})
.ServerFiltering(true);
})
)
【问题讨论】:
标签: asp.net-mvc kendo-ui telerik