Column Menu

The KendoReact Data Grid enables you to show a menu with quick actions for its columns.

The column menu provides flexible options for high-level customization. For example, the regular sorting and filtering features are represented by individual components which allows you to implement complex scenarios and meet the specific requirements of your project.

The Grid Package is part of KendoReact, a professional UI components library designed and built from the ground up for React to make developers more productive. To try it out, sign up for a free 30-day trial.

Basic Usage

To configure the column menu, use the columnMenu option of the columns.

The following example demonstrates how to utilize the following built-in components while you implement the column menu in the Data Grid:

  • Filter - component applying filters to the column
  • Sort - component for applying sorting the column
  • Group - component for grouping and ungrouping the column
Example
View Source
Edit In Stackblitz  
Change Theme:

Checkbox Filter

The ColumnMenu provides the GridColumnMenuCheckboxFilter component, which provides a checkbox list to filter the column data.

The following example demonstrates how to setup the checkbox filtering:

Example
View Source
Edit In Stackblitz  
Change Theme:

Custom Components

You can integrate custom components in the column menu and pass additional properties to them.

The following example demonstrates how to:

  • Render the columns inside the column menu based on an array of the column names and on the column show property.
  • Hide columns from the column menu and enable the Grid to update the column menu accordingly.

To access all demo files, refer to the tree pane of the file.

Example
View Source
Edit In Stackblitz  
Change Theme:

Customizing the Filter Component

The filter component of the column menu enables you to customize its user interface (UI) by passing a custom component to the filterUI property.

The following example demonstrates how to customize the UI of the column-menu filter component. To access all demo files, refer to the tree pane of the file.

Example
View Source
Edit In Stackblitz  
Change Theme:

Styling the Column Menu Icon

Both the GridColumnMenuFilter and GridColumnMenuSort components expose the active static method which checks if filtering and sorting are applied to a specific field. You can use these methods for applying custom CSS classes to the column menu and mark it as active.

The following example demonstrates how to style the column-menu icon when sorting and filtering are applied.

Example
View Source
Edit In Stackblitz  
Change Theme: