Skip to main content

Filtering data

You can filter data in the spreadsheet to show only the records that meet the criteria you specify.

To activate filtering, use one of two ways:

  • Set focus on a cell or select a range of cells and click the Filter button in the toolbar

DHTMLX Spreadsheet toolbar with the Filter button to enable data filtering

  • Set focus on a cell or select a range of cells and go to: Data -> Filter in the menu

DHTMLX Spreadsheet Data menu with the Filter option for activating column filters

After that, a filter icon appears on the right of each column header in the range.

Opening a filter with the keyboard​

To open the filter of a column without the mouse:

  • Move the active cell to the column header cell with the filter icon

  • Press Shift + F10 or the Menu key to call the context menu and choose Open filter

DHTMLX Spreadsheet context menu of a header cell with the filter icon and the Open filter command focused

The Open filter command appears in the context menu only for the cells with the filter icon. You can also choose it after right-clicking such a cell. In the read-only mode, the context menu and the Open filter command are not available.

The filter popup takes the focus, and Tab moves between its controls. Esc closes the popup and returns the focus to the cell. If a dropdown list or a date picker is open in the popup, Esc closes it first.

Filtering by condition​

  • Click the filter icon of the necessary column

  • Select one of the built-in comparison operators, for example, Greater than

  • Specify the filter criterion and click Apply

DHTMLX Spreadsheet column filter dropdown with comparison operators such as Greater than

Clearing a filter​

To clear a filter, click the filter icon in the column header, select By condition: None, and then click Apply.

DHTMLX Spreadsheet filter dialog with the By condition None option for clearing filters

Filtering by values​

  • Click the filter icon of the necessary column

  • Click the Unselect all button

DHTMLX Spreadsheet column filter with the Unselect all button and value checkboxes

  • Select the check boxes for the values you want to show and click Apply

Clearing a filter​

To clear a filter, click the filter icon in the column header, click the Select all button, and then click Apply.

DHTMLX Spreadsheet column filter dialog with the Select all button for clearing value filters

Removing filters​

To disable filtering, do one of the following:

  • click the Filter button in the toolbar
  • or go to: Data -> Filter in the menu

The filter icons disappear from the column headers, and all hidden records reappear.