The jQuery object representing filter menu form element.
The field of the column for which the filter menu is initialized.
The widget instance which fired the event.
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" }
],
dataSource: [
{ name: "Jane Doe"},
{ name: "John Doe"}
],
filterable: true,
filterMenuInit: function(e) {
if (e.field == "name") {
var firstValueDropDown = e.container.find("select:eq(0)").data("kendoDropDownList");
firstValueDropDown.value("contains");
firstValueDropDown.trigger("change");
var logicDropDown = e.container.find("select:eq(1)").data("kendoDropDownList");
logicDropDown.value("or");
logicDropDown.trigger("change");
var secondValueDropDown = e.container.find("select:eq(2)").data("kendoDropDownList");
secondValueDropDown.value("contains");
secondValueDropDown.trigger("change");
}
}
});
</script>
<div id="grid"></div>
<script>
function grid_filterMenuInit(e) {
if (e.field == "name") {
var firstValueDropDown = e.container.find("select:eq(0)").data("kendoDropDownList");
firstValueDropDown.value("contains");
var logicDropDown = e.container.find("select:eq(1)").data("kendoDropDownList");
logicDropDown.value("or");
var secondValueDropDown = e.container.find("select:eq(2)").data("kendoDropDownList");
secondValueDropDown.value("contains");
}
}
$("#grid").kendoGrid({
columns: [
{ field: "name" }
],
dataSource: [
{ name: "Jane Doe"},
{ name: "John Doe"}
],
filterable: true
});
var grid = $("#grid").data("kendoGrid");
grid.bind("filterMenuInit", grid_filterMenuInit);
</script>