I would like to adjust the Kendo-Grid height automatically such as the bottom grid is at 20px from the bottom of the window.
.--------------------. -
| Navbar | |
| .------------. | |
| | Kendo-Grid | | | Window Height
| | | | |
| '------------' | |
'--------------------' -
My current solution uses Javascript:
<div class="container-fluid">
<div id="grid"></div>
</div>
<script>
$(window).resize(function() {
let height = window.innerHeight - $('#grid').offset().top - 20
$('#grid').css('height', height + 'px')
$('#grid').data("kendoGrid").refresh()
})
</script>
I am wondering if there is a better solution.