Grid view refreshing after div.style.height changing

I have

which is tied with myGrid dhtmlGrid object. The myGrid.enableAutoHeight(false) is mostly suitable for me. But web site mechanics causes to change height of gridbox tag like document.getElementById(“gridbox”).style.height=“500px”. How can I refresh “gridbox” to render grid on the whole of the container height?

I have been trying to generate program resize event:

var el=document.getElementById(“gridbox”);
var ev=document.createEvent(“HTMLEvents”);
ev.initEvent(“resize”,true,false);
el.dispatchEvent(ev);

but there is the side effect of the code recursion call.

Please, try to use the setSizes() method:
docs.dhtmlx.com/api__dhtmlxgrid_setsizes.html