Core Features

Advanced Features

JavaScript Data GridAdvanced Filter

Version 36.2.0
Enterprise

The Advanced Filter allows for complex filter conditions to be entered across columns in a single type-ahead input, as well as within a hierarchical visual builder.

The Advanced Filter is enabled by setting the property enableAdvancedFilter = true. By default, the Advanced Filter is displayed between the column headers and the grid rows. It can instead be displayed outside of the grid by setting an Advanced Filter Parent. The buttons shown alongside the input can be customised.

const gridOptions = {
    enableAdvancedFilter: true,
    defaultColDef: {
        // Include all columns in the Advanced Filter
        filter: true,
    },

    // other grid options ...
}

Advanced Filter and Column Filters cannot be active at the same time. Enabling Advanced Filter will disable Column Filters.

Advanced Filter Input Copy Link

The example below demonstrates the Advanced Filter:

  • Start typing athlete into the Advanced Filter input. As you type, the list of suggested column names will be filtered down.
  • Select the Athlete entry by pressing ↵ Enter or ⇥ Tab, or using the mouse to click on the entry.
  • Select the contains entry in a similar way.
  • After the quote, type michael followed by an end quote (").
  • Press ↵ Enter or click the Apply button to execute the filter.
  • Try out each of the columns to see how the different Cell Data Types are handled.
  • Complex filter expressions can be built up by using AND and OR along with brackets - ( and ).

Advanced Filter Builder Copy Link

As well as typing into the Advanced Filter input, Advanced Filters can also be set by using the Advanced Filter Builder. This displays a hierarchical view of the filter, and allows the different filter parts to be set using dropdowns and inputs. It also allows for filter conditions to be added, deleted and reordered.

The Advanced Filter Builder can be launched by clicking the Builder button next to the Advanced Filter input. It can also be shown and hidden via the API, and its options customised, as described in Advanced Filter Builder.

The following example demonstrates the Advanced Filter Builder:

  • Click on any of the dropdown pills to change the join operators, columns and filter options.
  • Click on the value pills to change the filter values.
  • Use the drag handles to move the filter conditions or groups around.
  • Use the add and remove buttons to create new conditions or delete existing ones.
  • If the filter is valid (and does not match the already applied filter), click the Apply button to apply the filter.

Next Steps Copy Link

  • Columns & Filter Options - which columns appear, how they are named, the filter options each offers, and how each Cell Data Type is compared.
  • Input & Builder - configuring the Advanced Filter, its parent element and the Advanced Filter Builder.
  • Custom Filter Options - offering Custom Filter Options in the Advanced Filter.
  • Filter Model / API - reading and setting the Advanced Filter Model.
  • Server-Side Row Model - using the Advanced Filter with the Server-Side Row Model instead of the Client-Side Row Model.