65.9K
CodeProject is changing. Read more.
Home

Resizing grid when window is resized

starIconstarIconstarIconstarIconstarIcon

5.00/5 (4 votes)

Nov 18, 2011

CPOL
viewsIcon

20582

How to resize a grid when browser window resizes.

In order to resize a grid when the browser window changes its size, you can subscribe to the window.onresize event using jQuery.

Here is an example:

$(window).resize(function() {
    
    $(#grid).height($(window).height());
    $(#grid).width($(window).width());
});

If you want to do the same using ExtJs framework, please see this link http://myextjs.blogspot.com/2011/11/resize-window-resize-grid.html[^].