I have a kendo grid that I've added a custom filter field to. The issue I'm running into is that my filter won't filter on the EEFinalize column. It filters fine on any column that has an actual word, but if it's a boolean true/false value it won't filter.
This is my search script
$(document).ready(function () {
$("#FieldFilter").keyup(function () {
var value = $("#FieldFilter").val();
var grid = $("#grid").data("kendoGrid");
if (value) {
grid.dataSource.filter({
login: "or",
filters: [
{ field: "ProfileName", operator: "contains", value: value },
{ field: "EEFinalize", operator: "contains", value: value }
]
})
} else {
grid.dataSource.filter({});
}
});
});
I also have converted the values of true/false to yes/no with clientTemplate.
columns.Bound(obcs => obcs.EEFinalize).ClientTemplate("#= EEFinalize ? 'Yes'
: 'No' #").Title(FieldTranslation.GetLabel("EEFinalize", GlobalVariables.LanguageID));
I'm assuming the operator is probably incorrect but whatever I try it doesn't seem to filter anything. It runs the filter on the column but returns no values. All values in column are 'no' so it should display everything. In this case it filters it down to nothing.
If I select the grid filter icon it gives me options of "is true" and "is not true"