• What is KendoReact
  • Getting Started
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Formupdated
    • Ganttupdated
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Map
    • Notification
    • OrgChartnew
    • PDF Processing
    • PDFViewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Upload
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Filtering

The KendoReact Data Grid enables you to display only those Grid records which meet specified criteria.


Getting Started

To enable filtering:

  1. Set the filterable prop of the Grid which will render a filter row under the column headers.
  2. Set the filter option of the Grid. The filtering conditions are declared as FilterDescriptors or CompositeFilterDescriptor.
  3. Handle the onFilterChange or the onDataStateChange event of the Grid. The onDataStateChange event is recommended when the Grid will have other data operations as it provides the complete dataState in a single event.
  4. Filter the data on the client by using our built-in methods filterBy or process. The data can also be filtered on the server by making a request using the event parameters.

The filterBy method is recommended when using the onFilterChange event. The process method is recommended when using the onDataStateChange event.

Each consecutive filter is added to the previous ones and reduces the subset of data.

By default, when filtering is enabled, the Grid renders a filter row in its header. Based on the type of data the columns contain, the filter row displays filtering components in each column header where the user can filter string, numeric, boolean, or date data types.

Filter Rows - filterBy Method

To use the filterBy method you have to set the filter property of the Grid with the current filter expression and handle the onFilterChange to retrieve the new expression.

The following example demonstrates how to use the filterBy helper method:

Example
View Source
Change Theme:

Filter Rows - process Method

When multiple data-operations are enabled (filtering, sorting, paging, etc.), using the process method and the data state from the onDataStateChange event is the recommended approach.

The following example demonstrates how to use the process helper method:

Example
View Source
Change Theme:

Column Menu Filter

The columnMenu allows using the GridColumnMenuFilter or the GridColumnMenuCheckboxFilter component to filter the Grid. This provides menu like filtering functionality inside a popup container for the column.

This example showcase how to filter a column using the columnMenu.

Example
View Source
Change Theme:

External Filter

You can use the KendoReact Filter component to build complex filter expressions and filter the data inside the Grid.

Example
View Source
Change Theme:

External Filtering with Input

You can use an external Input to filter the Grid.

Example
View Source
Change Theme:

Custom Filter Cells

The filterCell property of the GridColumn enables the full customization of the filter cells.

The following example demonstrates how to implement a KendoReact DropDownList component for filtering the products by category and price range.

Example
View Source
Change Theme:

Custom Filter Operators

The Grid allows you to customize the operators for the numeric, text, and date filter types by using the filterOperators property which accepts GridFilterOperators. The Grid uses the first operator from each type as its default operator. The Boolean filter types always use the equal operator.

Example
View Source
Change Theme: