3.2.0

Resizing window reflect as empty space in grid component

I am missing "auto" rendering when browser window size is changed... for example, when grid component has height=100% and when resizing the browser window to bigger than before there is an empty space in grid instead of re-rendered grid to fill up empty space.

Is there a method on grid component to force render to be triggered when whidow size is changed?

Maybe would be nicer if this would be implemented in the grid control?
Bert
May 29,
A possible solution that I came up with onResize I call a function that retrieves the new width of the window. I found that I needed to subtract 76 to make it look correct. What space is left is taken up by the scroll bar. I then reset the column width by taking the width dividing it by 100 and multiplying it by the percentage the width should be for the column. You need to make sure that the percentages total 100. The only down side that I found is that the grid can be slow to redraw.

<script>
function reCalcGridSize() {
//get the width of the window
winW = document.body.offsetWidth-76;
// set size of table
obj.setColumnWidth((winW/100)*5, 0);
obj.setColumnWidth((winW/100)*55, 2);
obj.setColumnWidth((winW/100)*15, 4);
obj.setColumnWidth((winW/100)*15, 5);
obj.setColumnWidth((winW/100)*10, 6);
}
</script>


<body onResize="reCalcGridSize();">
Stephen
May 30,

This topic is archived.

See also:


Back to support forum