我想在Kendo UI网格中翻译过滤器项目,这意味着按升序排序,等于等等。(参见下面的图片)。
我试图在官方的Kendo Grid文档中找到它,但没有运气。
我该怎么办?
感谢您的帮助。
修改
我试过这种方式但它只适用于信息标签:
filterable: {
mode: "row",
messages: {
info: 'enter what you want here:',
equals: 'enter what you want here:'
}
},
答案 0 :(得分:3)
试试这个:
<强>剃刀:强>
@(Html.Kendo().Grid(Model)
.Name("listView")
.Filterable(f => f.Messages(m => m.Equals("text here"))
<强>使用Javascript:强>
$("#grid").kendoGrid({
filterable: {
messages: {
info: 'enter what you want here:',
and: 'enter what you want here:',
cancel: 'enter what you want here:',
clear: 'enter what you want here:',
filter: 'enter what you want here:',
isFalse: 'enter what you want here:',
isTrue: 'enter what you want here:',
operator: 'enter what you want here:',
or: 'enter what you want here:',
selectValue: 'enter what you want here:',
value: 'enter what you want here:',
operators: {
string: {
eq: "enter what you want here:",
neq: "enter what you want here:",
startswith: "enter what you want here:",
contains: "enter what you want here:",
doesnotcontain: "enter what you want here:",
endswith: "enter what you want here:",
eq: "enter what you want here:",
neq: "enter what you want here:"
}
}
}
}
});
答案 1 :(得分:0)
filterable: {
messages: {
info: "Custom header text:", // sets the text on top of the Filter menu
filter: "CustomFilter", // sets the text for the "Filter" button
clear: "CustomClear", // sets the text for the "Clear" button
// when filtering boolean numbers
isTrue: "custom is true", // sets the text for "isTrue" radio button
isFalse: "custom is false", // sets the text for "isFalse" radio button
//changes the text of the "And" and "Or" of the Filter menu
and: "CustomAnd",
or: "CustomOr"
},
operators: {
//filter menu for "string" type columns
string: {
eq: "Custom Equal to",
neq: "Custom Not equal to",
startswith: "Custom Starts with",
contains: "Custom Contains",
endswith: "Custom Ends with"
},
//filter menu for "number" type columns
number: {
eq: "Custom Equal to",
neq: "Custom Not equal to",
gte: "Custom Is greater than or equal to",
gt: "Custom Is greater than",
lte: "Custom Is less than or equal to",
lt: "Custom Is less than"
},
//filter menu for "date" type columns
date: {
eq: "Custom Equal to",
neq: "Custom Not equal to",
gte: "Custom Is after or equal to",
gt: "Custom Is after",
lte: "Custom Is before or equal to",
lt: "Custom Is before"
},
//filter menu for foreign key values
enums: {
eq: "custom Is Equal to",
neq: "custom Is Not equal to"
}
}
}
http://docs.telerik.com/kendo-ui/controls/data-management/grid/localization