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

Virtual Scroll with child grid having dynamic height

1 Answer 1091 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Deepak
Top achievements
Rank 1
Deepak asked on 31 Aug 2020, 07:33 AM

Hi,

We have a scenario where we are displaying parent and child grids on expand collapse.

We are also using virtualization.

Can we set dynamic heights to child grids with virtualization enabled? e.g if on expand a record child grid has 1 record only and on expanding another parent row it has child grid with say 15 records.

Child grid height set as per no of records.

As per this - https://www.telerik.com/kendo-angular-ui/components/grid/scroll-modes/virtual/

We need to set fixed detailRowHeight property. But here we have dynamic child grid height.

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 02 Sep 2020, 05:52 AM

Hello Deepak,

For the virtualization to work, the Grid must know its exact height, height of each row and the height of each detail row. All that is required for scroll bar size and position calculations.

That said, those values should be static and the Grid doesn't support calculating dynamic heights as the detail row content could update its content asynchronously. And so if the Grid were to constantly traverse all rows and detail rows to extract their current height, this would result in poor performance.

So, you will have to make do with defining a static height for the detail rows.

Let me know if I could provide further information on the topic.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Deepak
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or