Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Set height of the whole jqGrid object including the pager
03/10/2012
18:25
Avatar
Getfree
Member
Members
Forum Posts: 8
Member Since:
03/10/2012
sp_UserOfflineSmall Offline

I posted this question at Stackoverflow but it didn't get any attention so I ask here.

jqGrid has the method setGridHeight which sets the height of the grid cells only.
What I need is to set the height of the whole thing (including the pager) when the browser is resized.

Is there a way to do that?

03/10/2012
19:18
Avatar
nelsonm
Michigan, USA
Member
Members
Forum Posts: 106
Member Since:
20/08/2011
sp_UserOfflineSmall Offline

yes there is…  i will post it.

however, you will need to tweak it to fit your needs.  My site is buiilt using jquery tabs with jqgrid's defined in each tab content area.  It took me a while, but my site and the contained jqgrids now beheave properly (for the most part) within the browser window.  my method is not perfect but works pretty good.

the following is a subset of the jquery tab structure that defines how my site looks.  it also is used by the width & height management functions i created to manage the resizing of the site within the browser window…

Image Enlarger

Here is what the site looks like…

Image Enlarger

here is the site beheaving properly within a resized browser window.

[Image Can Not Be Found]

here is the code that manages resizing the width and height within the browser window…

3Image Enlarger

4Image Enlarger

i hope this helps.

03/10/2012
20:22
Avatar
Getfree
Member
Members
Forum Posts: 8
Member Since:
03/10/2012
sp_UserOfflineSmall Offline

I see.

When we set the height via $('#grid').setGridHeight(someHeight) the final height of the grid is actually:

someHeight + heightOfGridHeader + heightOfGridPager ;

Where heightOfGridHeader+heightOfGridPager is usually around 50 pixels.

I would consider changing the behabior of the setGridHeight method so it affects the whole grid and not just the data rows. It's more intuitive that way.

Many thanks.

04/10/2012
23:02
Avatar
sokol
Member
Members
Forum Posts: 5
Member Since:
02/10/2012
sp_UserOfflineSmall Offline

posted into wrong subject

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
37 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information