【发布时间】:2015-12-29 12:35:35
【问题描述】:
我正在研究 Kendo UI 网格,并且我实现了下拉列表(用于编辑模式(显示弹出窗口))。当我的网格加载时,总是为每个在编辑模式下使用下拉列表的单元格显示“未定义”值。一切都很好,如果我使用添加/编辑模式来插入/更新值。我不知道我的代码有什么问题。这是我的代码的一部分:
columns: [{
field: "Id",
title: "Id",
width: 50
}, {
field: "finNaturalBusinessYearId",
title: "Poslovna godina",
width: 70,
template: "#= finNaturalBusinessYearId.NaturalBusinessYear #",
editor: businessyeardropdown
},...
下拉列表的功能:
function businessyeardropdown(container, options) {
$('<input required data-text-field="NaturalBusinessYear" data-value-field="Id" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autobind: false,
dataSource: {
transport: {
read:
{
url: "/api/BusinessYear",
type: "GET",
dataType: "json"
}
}
}
});
}
请帮忙...
【问题讨论】:
标签: javascript kendo-ui kendo-grid