I am not using server filtering.
Here is the implication of it.
https://dph1.adph.state.al.us/alchronicresources (production environment)
If you try filtering via FacilityType and/or ProgramType, no results are returned.
So I was able to create a fix for it in my test environment, but not sure how accurate it is because it does not persist the filter selection after I hit the Filter button. However, it does filter and return results, but the users is unable to see what selection was made..
Here is the current code where the filtering semi works..
$("#grid2").kendoGrid({
//rowTemplate: $("#rowTemplate").html(),
//altRowTemplate: $("#altRowTemplate").html(),
filter:
function (e) {
if (e.filter != null) {
e.filter.filters.forEach(function (f) {
f.operator = "contains";
});
}
},
selectable: true,
change: onChange,
dataSource:
{
ds
},
filterable:
{
multi: true,
search: true
},
columns: [
{
field: "FacilityName",
title: "Facility Name"
},
{
field: "Address",
title: "Address"
}, {
field: "City",
title: "City"
}, {
field: "County",
title: "County"
},
{
field: "District",
title: "District"
},
{
field: "Zip",
title: "Zip Code"
}, {
field: "PhoneNumber",
title: "Phone Number"
}
, {
field: "FacilityTypeName",
title: "Facility Type"
}
, {
field: "ProgramTypename",
title: "Program Type"
}
//, {
// field: "GroupType",
// title: "Group Type"
//}
],
scrollable:
true
//{
// virtual: true
//}
,
height: 500,
sortable: true,
pageable: {
pageSize: 5,
pageSizes: true
},
groupable: true,
editable: false,
columnMenu: true,
excel: {
fileName: "ALChronicResources.xlsx",
filterable: true,
allPages: true
},
columnMenuInit: function (e) {
var multiCheck = this.thead.find("[data-field=" + e.field + "]").data("kendoColumnMenu").filterMenu.checkBoxAll;
if (multiCheck) {
var filterMultiCheck = this.thead.find("[data-field=" + e.field + "]").data("kendoColumnMenu").filterMenu
filterMultiCheck.container.empty();
filterMultiCheck.checkSource.sort({ field: e.field, dir: "asc" });
filterMultiCheck.checkSource.data(filterMultiCheck.checkSource.view().toJSON());
filterMultiCheck.createCheckBoxes();
}
},
pdf:
{
fileName: "ALChronicResources.pdf",
allPages: true,
avoidLinks: false,
landscape: true,
margin: { top: "2cm", left: "1cm", right: "1cm", bottom: "1cm" },
paperSize: "A4",
repeatHeaders: true,
scale: 0.3,
template: $("#page-template").html(),
title: "AL Public Health Chronic Disease Support and Resources"
}
//persistSelection: true
});