Click here to Skip to main content
Click here to Skip to main content

Tagged as

Resizing grid when window is resized

, 18 Nov 2011
Rate this:
Please Sign up or sign in to vote.
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[^].

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Gregory Nozik
Software Developer (Senior) Superderivatives
Israel Israel
I’m a .net architect, focusing mainly on
writing a scalable components, My expertise is designing for optimal performance and scalability. Always in search
of new knowledge and ambitions.
 
Specialties
Design Patterns, UML, OOP/OOD, .NET, C#, C++, STL, ATL, COM/COM+, VB/VB.NET, IIS, ISAPI,ASP/ASP.NET, WebServices, WCF,HTML/JavaScript, Ajax, XML/XSL/XSD, SQL
 
Personal blog gregnozik.blogspot.com

Comments and Discussions

 
SuggestionResizing grid when Dialog or popup is resized PinmemberMember 37365325-Jan-13 8:16 
GeneralReason for my vote of 5 so simple Pinmemberitaitai26-Nov-11 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 18 Nov 2011
Article Copyright 2011 by Gregory Nozik
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid