Your search did not match any results.
Pivot Grid

Header Filter

A header filter allows a user to filter field values by including or excluding them from the applied filter. Click a header filter icon in the field chooser or on the field panel to open a popup menu that displays all unique field values.

Use the following options to configure the header filter:

  • allowSearch
    Enables a user to search through field values.

  • showRelevantValues
    Specifies whether to show all field values or only those that satisfy the other applied filters.

  • width and height
    Configures the popup menu size.

In this demo, a filter is applied to the Country field. This filter includes only the United Kingdom. The City field displays only cities in this country because the showRelevantValues option is true. If you clear the corresponding checkbox under the widget, the City field displays all cities, regardless of the other applied filters.

Copy to CodePen
var DemoApp = angular.module('DemoApp', ['dx']); DemoApp.controller('DemoController', function DemoController($scope) { $scope.headerFilter = { allowSearch: true, showRelevantValues: true, width: 300, height: 400 }; $scope.pivotGridOptions = { allowFiltering: true, allowSorting: true, allowSortingBySummary: true, height: 570, showBorders: true, bindingOptions: { headerFilter: "headerFilter" }, fieldChooser: { allowSearch: true }, fieldPanel: { visible: true }, dataSource: { fields: [ { dataField: "[Product].[Category]", area: "column" }, { dataField: "[Product].[Subcategory]", area: "column" }, { dataField: "[Customer].[City]", area: "row" }, { dataField: "[Measures].[Internet Total Product Cost]", area: "data", format: "currency" }, { dataField: "[Customer].[Country]", area: "filter", filterValues: ["[Customer].[Country].&[United Kingdom]"] }, { dataField: "[Ship Date].[Calendar Year]", area: "filter", filterValues: ["[Ship Date].[Calendar Year].&[2004]"] } ], store: { type: "xmla", url: "", catalog: "Adventure Works DW Standard Edition", cube: "Adventure Works" } } }; $scope.allowSearchOptions = { text: "Allow Search", bindingOptions: { value: "headerFilter.allowSearch" } }; $scope.showRelevantValuesOptions = { text: "Show Relevant Values", bindingOptions: { value: "headerFilter.showRelevantValues" } }; });
<!DOCTYPE html> <html xmlns="" > <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src=""></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <script src=""></script> <script>window.angular || document.write(decodeURIComponent('%3Cscript src="js/angular.min.js"%3E%3C/script%3E'))</script> <script src=""></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container" ng-app="DemoApp" ng-controller="DemoController"> <div id="sales" dx-pivot-grid="pivotGridOptions"></div> <div class="options"> <div class="caption">Options</div> <div class="option"> <div dx-check-box="allowSearchOptions"></div> </div> <div class="option"> <div dx-check-box="showRelevantValuesOptions"></div> </div> </div> </div> </body> </html>
#sales { max-height: 570px; } .options { padding: 20px; margin-top: 20px; background-color: rgba(191, 191, 191, 0.15); } .caption { font-size: 18px; font-weight: 500; } .option { width: 24%; display: inline-block; margin-top: 10px; }