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
setGridWidth() lossy column widths over time
05/05/2010
00:41
Avatar
macbuoy
Silver Spring, MD
Member
Members
Forum Posts: 24
Member Since:
16/10/2009
sp_UserOfflineSmall Offline

as per the documentation, I use setGridWidth() to resize my grid if I detect that the window is resized--I get the width of the parent element and setGridWidth() accordingly. oddly, if the grid is resized enough times, columns lose width and cannot get it back--even if the window is made very large. Here is a demo, what I show is the initial load of the grid followed by epileptic resizing of the width of the window to quickly demonstrate the eventual failure of the columns to gain any width back when the window width is enlarged:

http://screencast.com/t/OWRlZmJiZmU

This is a problem because I am saving the user's grid config on pageUnload. Every time they come back to the page, I load the columns just a tad narrower because of the above effect. Eventually, the columns are completely collapsed.

06/05/2010
13:44
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Cluold you please try with the last 3.6.5 version. We have made some fixes on 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.

19/05/2010
17:46
Avatar
macbuoy
Silver Spring, MD
Member
Members
Forum Posts: 24
Member Since:
16/10/2009
sp_UserOfflineSmall Offline

I have tested this in 3.6.5 and it is, indeed, fixed! Thanks!!!

HOWEVER, it turns out that this is NOT the cause of my problem with saved gridConfigs where the columns eventually lose width when the grid page(s) is revisited. That problem seems to be a combination of saving the config and another bug I will report where, under certain conditions, the grid scrollbar column shows up on initial load just outside of the parent element.

To work around this, using onGridComplete I was triggering my window.resize event which is bound to my method for making the grid width track the parent element width properly using setGridWidth(). When shrinkToFit is enabled, this initial gridComplete::setGridWidth() call is, natually, lossy when the shrinkToFit formula results in float numbers (I'm assuming these are converted to real numbers and so, across multiple columns, pixels are lost). So, my saved settings, saved on page-Unload, always have widths a little smaller than the previous save.

Oddly enough, the issue of the over-hanging scrollbar is inconsistent--it happens all the time in IE 8, but, in Chrome and Firefox only when the window is maximized to my 16 inch screen. Again, I'll be reporting this on the bugs forum as a separate issue.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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