Skip to content

Instantly share code, notes, and snippets.

@milannankov
Last active November 30, 2016 08:32
Show Gist options
  • Save milannankov/c8cebac5eb8d434810b954d3c8845fc6 to your computer and use it in GitHub Desktop.
Save milannankov/c8cebac5eb8d434810b954d3c8845fc6 to your computer and use it in GitHub Desktop.
Kendo Grid Custom Filtering With Column Menu
$("#grid").kendoGrid({
dataSource: localDataSource,
columnMenu: true,
columnMenuInit: onColumnMenuInit,
filterable: true,
columns: [
{ field: "url", title: "Page Url", width: "350px" },
{ field: "name", title: "Page name" }
],
editable: true
});
function onColumnMenuInit(e) {
// Find filtering container
var filterContainer = e.container.find(".k-filter-menu");
// Remove existing filtering UI
filterContainer.empty();
// Add custom UI
filterContainer.html($("<div>Something useful here</div>"));
};
$("#grid").kendoGrid({
dataSource: localDataSource,
filterMenuInit: onFilterMenuInit,
filterable: true,
columns: [
{ field: "url", title: "Page Url", width: "350px" },
{ field: "name", title: "Page name" }
],
editable: true
});
function onFilterMenuInit(e) {
// Remove existing filtering UI
e.container.empty();
// Add custom UI
e.container.html($("<div>Something useful here</div>"));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment