View Full Version : Grid Resize on Browser Resize

23 Nov 2015, 2:52 AM

I am Using Extjs 4.1.JSP/Js to render a Grid
I have a Problem.
When i resize the Browser,the grid automatically should change the height and width according to the new size of the window
I am using
var wdt = window.outerWidth;
var hgt = window.outerHeight;

To assign width and height to Grid.
Can you please help me to achieve the same

Thanks in Advance

Gary Schlosberg
23 Nov 2015, 12:23 PM
How about using a viewport with a fit layout?

25 Nov 2015, 7:24 PM
Thanks Gary,Does this work for even For Panel with Lot of fields

26 Nov 2015, 7:32 AM
Fit layout is applicable when only one item, in this case a grid needs to be added as an item in a container or panel. With lots of fields, you may need to use combination of various layouts. My personal favorite is table layout but again that would depend on exactly what kind of UI design you have been provided.