New to KendoReact? Start a free 30-day trial

Expand only one detail row at a time

Updated on Jun 8, 2026

Environment

Product Version8.1.1
ProductProgress® KendoReact Grid

Description

How can I expand only one detail row at a time?

Solution

This can be achieved by setting the expanded field to false for all other rows when one row is expanded in the onExpandChage event handler:

jsx
const expandChange = (event) => {
    const updatedData = data.map((item) => ({
        ...item,
        expanded: item.ProductID === event.dataItem.ProductID ? !event.dataItem.expanded : false
    }));
    setData(updatedData);
};

The following example showcases this approach in action:

Example
View Source
Loading ...
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support