New to KendoReactStart a free 30-day trial

Implement expand/collapse in Grid with flat data without grouping

Environment

Product Version5.12.0
ProductProgress® KendoReact Grid

Description

I have flat data and I want to add expand/collapse functionality for hiding a given set of items by some custom condition.

Solution

Add a column with custom "cell" for rendering the expand/collapse icons. Within the Grid's rowRender the 'child' items visibility can be determined by the custom logic in which the items are 'grouped'.

Following is an example demonstrating how to simulate hierarchy with flat data where the order of the items in the 'data' are in the correct order and the parent items have ParentID equal to 0.

Change Theme
Theme
Loading ...
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support