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
ShowHideCol function bug
20/10/2009
11:30
Avatar
lotjuh
Member
Members
Forum Posts: 28
Member Since:
06/09/2009
sp_UserOfflineSmall Offline

Hi Tony,

While playing with the showCol and hideCol functions, I stumbled upon a bug which resides both in the 3.5.x and 3.6 beta versions.

The bug:

I have 6 columns from which the first 2 are shown and the last 4 are hidden. I use a slider to dynamically rotate through the hidden and shown columns. When I slide my slider 1 step to the right, column 1 will be hidden and column 3 will be shown. Then when I slide my slider another step to the right, column 2 will be hidden and column 4 will be shown and my grid width will be resized to some really big size all of a suddon.

I've been following this with firebug, and I see the following happen in the ShowHideCol function:

$t.p.tblwidth is currently 500

this.width is currently "16"

$t.p.tblwidth += this.width is called

$t.p.tblwidth is now 50016

My solution:

replace the code in ShowHideCol : function(colname,show) :

if(show == "none") $t.p.tblwidth -= this.width; else $t.p.tblwidth += this.width;

with

if(show == "none") $t.p.tblwidth -= parseInt(this.width); else $t.p.tblwidth += parseInt(this.width);

Kind regards Lotte-Sara Laan

20/10/2009
12:56
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

Unfortunately you'll have to fix a lot of other cases too. colModel[i].width is assumed to be an integer all over the place.

The best fix (unless tony goes to the trouble of fixing every use of colModel width) is to supply integer values for the widths...

Mark

21/10/2009
05:13
Avatar
lotjuh
Member
Members
Forum Posts: 28
Member Since:
06/09/2009
sp_UserOfflineSmall Offline

Thx for the hint. Will do that from now on.

Might be smart in the long term to make sure you're working with integers when you're expecting them though (-:

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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