【发布时间】:2016-02-18 11:03:23
【问题描述】:
情况如下:我们有一个带有列的剑道网格,在一列中我们有一个用于过滤目的的剑道下拉列表。客户端基于angularjs,服务器端基于c#。那么,是否可以在不知道它的 id 的情况下为 kendo 下拉菜单设置默认值?我正在搜索第二天,在 web/teletrik 文档中找不到任何内容。
代码
$scope.GridOptions =
{
pageable: { refresh: true, pageSizes: true },
columns: [
// other columns here
{
field: "RegistrationStatus", title: "Status", width: 13,
filterable: {
operators: {
string: {
eq: "Is equal to",
neq: "Is not equal to"
}
},
ui: function(element) {
element.kendoDropDownList({
dataSource: [
{ Name: "Registered", Value: "PassedInterview" },
{ Name: "Pending", Value: "PassedInterview" },
{ Name: "Rejected", Value: "Rejected" }
],
dataTextField: "Name",
dataValueField: "Value",
optionLabel: "--Select Status--"
defaultValue: "PassedInterview" // smth like this, is this possible? or achieve in any other methods instead of taking dropdown id, which I dont know because this is hided inside
});
}
}
}
],
sortable: true,
filterable: true,
selectable: 'row',
editable: 'inline'
};
【问题讨论】:
标签: c# angularjs kendo-ui kendo-grid kendo-dropdown