I have a WebGrid that has its width and height set to 100%, so that when the window is resized ideally the webgrid would resize to fit.
This works for the width perfectly, as I make the window smaller the WebGrid's width is equally reduced and the scroll bar appears along the bottom of the WebGrid.
This does not work for the height, the height stays fixed, so as I make the window smaller I get a scroll bar on the window, instead of the WebGrid's height reducing and adding the scroll bar IN the WebGrid.
any help is appreciated! I dont know if there is a setting somewhere I need to set to get this to work.
look at my other post http://forums.infragistics.com/forums/t/2726.aspx
Where do you set the onresize event, in the body tag?
ie. <body onresize="uwgLoanApplications_InitializeLayoutHandler(gridName)">
or somewhere else?
We got arround the infinite loop by using clientHeight on the document instead of offsetHeight on the enclosing div. Using this causes loop:
Where <div id=caca> is the div that encloses the WebGrid. Thanks for the help, we're all good now.
Would you provide a bit more information?
I tried this in a resize event but it had no effect:
var height = document.documentElement.clientHeight; var grid = igtbl_getGridById("UG1"); var div = grid.getDivElement(); div.style.maxHeight = height;
It seems that this should be easy. If the grid is not going to abide by the height property given to it, then why provide that property?
Thanks for your help.
the maxHieght property works only for IE7, mozilla 2.0 and above and doesnt work for IE6.
I currently have the following solution impelemnted which works for all these browsers.
grid.resize(grid.MainGrid.offsetParent.offsetWidth - 4, gridHeight)