• What is KendoReact
  • Getting Started
  • Server Components
  • Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Only allow unique grouping in the Grid

Environment

Product Version5.16.1
ProductProgress® KendoReact

Description

How can I disable duplicate grouping for the Data Grid?

Solution

In the onGroupChange event handler, you can check if the newly added group exists in the group state variable. In addition, when the group is added, event.nativeEvent is undefined. Since the onGroupChange event is also responsible to remove groups (in that case event.nativeEvent is defined), therefore, set the group and resultState only when event.nativeEvent is defined and groupExists equals false.

This is an example demonstrating the implementation:

Example
View Source
Change Theme:

In this article

Not finding the help you need?