This is a migrated thread and some comments may be shown as answers.

Anyway to Stop a Nested Grid From Collapsing when Refreshing?

2 Answers 244 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
GokuJim
Top achievements
Rank 1
GokuJim asked on 14 Jun 2019, 01:44 PM

I currently have a nested KendoReact Grid with parent and children rows. Since this web application is for the purpose of real time status, I have implemented a data refresh from the server via a parent page use of a 30 second setInterval function that performs the asynchronous web service API call. If the user has expanded a parent row so as to see the children, is there anyway to stop the Grid from collapsing the parent row after the setInterval fires?

Thanks,

Jim

SKF USA, Inc.

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Jun 2019, 05:11 AM
Hello, James,

The information which rows to be expanded or collapsed is part of the data passed to the Grid:

https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-expandfield

In order, the keep the same rows expanded after a refresh I can suggest the following approach:

1) Keep an array in the state with all expanded items IDs.

2) When a request from the server is received, before passing the received data to the Grid, set the expanded field value based on the array IDs.

Please give this approach a try and let me know if additional assistance is needed on this matter.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
GokuJim
Top achievements
Rank 1
answered on 06 Aug 2019, 08:36 PM

Okay, will do. Thanks for the approach idea!

 

Jim

SKF USA, Inc.

Tags
General Discussions
Asked by
GokuJim
Top achievements
Rank 1
Answers by
Stefan
Telerik team
GokuJim
Top achievements
Rank 1
Share this question
or