Could you please educate me how to make Grid height dynamically change ?
like attached picture, if we have 2 rows, only show 2 rows height, if we have 40 rows, show 30 in first page, 10 in second page.
Thank you!
1 Answer, 1 is accepted
0
Tsvetomir
Telerik team
answered on 25 Jul 2019, 12:38 PM
Hi Sarah,
If declaring the height of the grid is omitted, it would automatically adapt its height according to the number of items within its data source. However, this would allow it to stretch until all of the content is shown. That is why, I can recommend setting the max-height CSS rule which would prevent the grid from stretching:
<style>
.k-grid-content {
max-height: 200px;
}
</style>
Regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.