您好我有一个4列的剑道网格,其中一列是日期类型。
我想为日期类型列显示额外的过滤器选项。以下是我的踪迹。
var grid = $("#mygrid").kendoGrid({
sortable: true,
pageable: true,
scrollable: true,
filterable: {
extra: true,
operators: {
string: {
startswith: "Starts with",
eq: "Is equal to",
neq: "Is not equal to",
contains: "Contains"
},
date: {
eq: "Is equal to",
neq: "Is not equal to",
gte: "Is after or equal to",
gt: "Is after",
lte: "Is before or equal to",
lt: "Is before",
}
}
},
当我说额外的:true时,它适用于所有列。但我不想为字符串类型列显示额外的过滤器。如何为日期列启用额外的:true?
由于
答案 0 :(得分:1)
您也可以在extra
中定义Columns.filterable
。
示例:
$("#grid").kendoGrid({
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
],
filterable: {
extra: false
},
columns: [
{ field: "name" },
{ field: "age", filterable: { extra: true} }
]
});
这定义了默认情况下它应该extra
使用false
而作为age
列,它将是true
。