【发布时间】:2020-01-01 02:29:30
【问题描述】:
@*<select id="attr-code-dropdown" class="ms-TextField-field detail-input"></select>*@
@(Html.Kendo().DropDownList()
.Name("AttributeCode")
.DataTextField("AttributeCode")
.DataValueField("AttributeCodeId")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("AttributeSecurityCode_Read", "AttributeCode")
.Data("filterCode");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("AttributeName")
)
<script>
function filterCode() {
return {
AttributeName: $("#AttributeName").val()
};
}
</script>
我的代码出了什么问题,它给了我这个错误。
kendo.all.js:198 未捕获错误:无效模板:' 属性类型 * kendo.syncReady(function(){jQuery("#AttributeName").kendoDropDownList({"dataTextField":"AttributeTypeName","dataValueField" :"AttributeTypeId","dataSource":{"transport":{"read":{"url":"/AttributeType/AttributeTypesSecurity_Read"},"prefix":""},"schema":{"errors":"错误"}}});});
【问题讨论】:
标签: kendo-ui kendo-asp.net-mvc