我将dropDownList用于我的某个网格列。我尝试在加载数据后手动选择一个项目:
columns: [
{
field: "SomeName", title: "Name",
editor: function (container, options) {
$scope.options = {
dataSource: someSource,
dataTextField: "Name",
dataValueField: "ID",
dataBound: function (e) {
e.sender.select(2);
}
}
var editor = $('<input kendo-drop-down-list k-options="options" required data-bind="value:' + options.field + '"/>')
.appendTo(container);
}
}]
但没有任何事情发生,服务器返回的数据是:
[{"ID":2,"Name":"abc"}]
答案 0 :(得分:0)
最后,我想出来了:
e.sender.value(2);