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
Resize problems with setGridWidth (shrink=true)
01/02/2010
12:49
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Hello!

I've detected a strange problem when I want to reload saved grid settings and resize my grid using the available space in the browser window.

What I do is:

1) load saved/cached colModel (with the width property for all columns) - as done in step (5)
2) create the grid with that loaded colModel settings
3) calculate the available space for the grid (minus some borders or other elements in the page)
4) set the new height and width with the methods jqGrid('setGridWidth', newWidth, true) and jqGrid('setGridHeight, newHeight)
5) save colModel settings for later use (when window/view is totally reloaded) - by means of using the jqGrid('getGridParam') method
6) unload grid when view is changed/destroyed

What I get is:

* the grid is resized to the new size (that's OK),
* and if I use the "shrink=true" option, the columns get shrinked to the new proportional size (also OK)
* BUT the strange thing is, that the last column in my table is growing with every of these resize iterations by about 20 px (size of scrollbar)

It looks like the grid is scaled to the new width using the total space, shrink all columns except the last one and then another resize steps shrinks all again to display the vertical scroll bar (because there are more rows in the grid then space available).

Another possible problem I could imagine is that it has to do with the reloading and saving of the colModel. Maybe the getGridParam-method does return wrong values for the last column inside the colModel (incl. or excl. the scrollbar width).

Maybe you have any tips where I could look for the problem, or you could find any problem regarding the width of the last column.

Kind regards,
Klaus.

01/02/2010
13:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello

Klaus, Thank you for the good explanation.

Short this is a bug  in setGridWidth and was posted from another user with example (currently can not find the link )

Also, in the moment I can not find appropriate fix for this.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

01/02/2010
13:20
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

I've found the other posting:

http://www.trirand.com/blog/?p.....gridwidth/

I will keep watching for a bug fix.

Thank you,
Klaus.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
27 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