Grid - Virtual scrolling with 100% height

1 Answer 137 Views
Grid
n/a
Top achievements
Rank 1
Iron
n/a asked on 28 Jun 2022, 10:41 AM
Hello, How I can have virtual scrolling with 100% grid height. Thank you.

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 01 Jul 2022, 08:40 AM

Hi Ioannis,

The essential part here is to make the Grid 100% high of the containing element. In order to achieve that all parent HTML elements of the Grid should be set to 100%. That is valid for all HTML elements that should have a percentage height. Please see the following knowledge base article on the topic:

https://www.telerik.com/kendo-angular-ui/components/knowledge-base/set-grid-height-to-100-percent/

Another option would be if the Grid is put in a container that has a fixed height. In such case, if the Grid has a percentage height it will be calculated as a percent of the containing element height.

Once the Grid height is set to be 100% you should count the number of visible elements in the Grid at once and set the pageSize to be three times that number in order to ensure smooth scrolling as documented on the virtual scrolling documentation article:

https://www.telerik.com/kendo-angular-ui/components/grid/scroll-modes/virtual/#toc-getting-started

I hope the provided details help.

Regards,
Svet
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Tags
Grid
Asked by
n/a
Top achievements
Rank 1
Iron
Answers by
Svet
Telerik team
Share this question
or