I have a problem with the KendoJS grid controller. Essentially I am trying to resize the grid on resizing the window to keep it filling the available space effectively.
I've found setOptions to change properties of the grid, and created this function to resize:
setHeight: function() {
var header_height = $('#local_toolbar').height();
header_height += $('#local_toolbar').next().height();
$('[data-role="querygrid"]').data('kendoGrid').setOptions(height: `${header_height}px`);
}
This does work correctly, but it also triggers a reload of the data store, which I don't want for two reasons:
- It can sometimes take a second or two
- The data is unlikely to have changed in the meantime, so it's unnecessary.
Is there a way to set the height of a Kendo grid without triggering this reload?