Kita dapat mengganti apa saja isi filterable (eq / contains / etc) dan bahasa yang digunakan pada Kendo Grid. Untuk memudahkan, kita bisa menyimpan variabel filterable pada webapp.js
[code language=”javascript”]
var customKendoGridFilter = {
messages: {
info: "Tampilkan yang memiliki nilai:", // sets the text on top of the filter menu
filter: "Filter", // sets the text for the "Filter" button
clear: "Hapus", // sets the text for the "Clear" button
// when filtering boolean numbers
isTrue: "Benar", // sets the text for "isTrue" radio button
isFalse: "Salah", // sets the text for "isFalse" radio button
//changes the text of the "And" and "Or" of the filter menu
and: "Dan",
or: "Atau"
//},
operators: {
//filter menu for "string" type columns
string: {
eq: "Is equal to",
neq: "Is not equal to",
startswith: "Starts with",
contains: "Contains",
endswith: "Ends with"
},
//filter menu for "number" type columns
number: {
eq: "Sama Dengan",
neq: "Tidak Sama Dengan",
gte: "Lebih Besar Atau Sama Dengan",
gt: "Lebih Besar",
lte: "Lebih Kecil Atau Sama Dengan",
lt: "Lebih Kecil"
},
//filter menu for "date" type columns
date: {
eq: "Sama Dengan",
neq: "Tidak Sama Dengan",
gte: "Setelah Atau Sama Dengan",
gt: "Setelah",
lte: "Sebelum Atau Sama Dengan",
lt: "Sebelum"
},
//filter menu for foreign key values
enums: {
eq: "Sama Dengan",
neq: "Tidak Sama Dengan"
}
}
};
[/code]
Contoh setting pada Grid
[code language=”javascript”]
var grid = $("#grid").kendoGrid({
//…
filterable: customKendoGridFilter,
//…
}).data("kendoGrid");
[/code]