Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1960
Set Grid's height to the maximum allowed by the browser
posted

Hello.

I have my webgrid configured to display the vertical scrollbar. I want the height of the grid to take as much space available on the browser window. If there's no more room, the grid's vertical scrollbar kicks in to allow the user see all remaining rows in the grid.

 The only way I can get that behavior is setting the grid's height to a fixed number (in px), but I want the height to adapt to the browser's height. If I set the grid's height to 100% the grid never uses the vertical scroll and all rows are displayed. As a result a vertical srollbar appears on my browser window. That's not what I need. I want the grid to adapt to the broswer's height, not the other way around.

 Is there a way to achieve that behavior?

Thanks.