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
jqGrid 4.1.0 shrinkToFit/grouping change
15/06/2011
20:23
Avatar
dlandis
Member
Members
Forum Posts: 5
Member Since:
02/07/2010
sp_UserOfflineSmall Offline

I upgraded 4.0.0 to 4.1.0 in my application. One particular grid stopped working which uses grouping, shrinkToFit, and groupColumnShow: [false].

I looked at the code in firebug and the change that causes the error is showHideCol function:

4.0.0:

            if(fndh===true) {
                if($t.grid.width!==$t.p.tblwidth) {
                    $($t).jqGrid("setGridWidth",$t.p.shrinkToFit===true?$t.grid.width:$t.p.tblwidth,true);
                    }
                }

4.1.0:

            if(fndh===true) {
                if($t.p.shrinkToFit === false) {
                    $($t).jqGrid("setGridWidth",$t.grid.width );
                } else if($t.grid.width!==$t.p.tblwidth) {
                    $($t).jqGrid("setGridWidth",$t.p.tblwidth );                
                }
            }

Basically it is calling setGridWidth and passing in tblwidth in 4.1.0 whereas it was passing in grid.width in 4.0.0. I changed my version of 4.1.0 and now it works — but of course I don't know what else this would effect:

4.1.0 (my version):

            if(fndh===true) {
                if($t.p.shrinkToFit === false) {
                    $($t).jqGrid("setGridWidth",$t.grid.width );
                } else if($t.grid.width!==$t.p.tblwidth) {
                    //$($t).jqGrid("setGridWidth",$t.p.tblwidth );
                    $($t).jqGrid("setGridWidth",$t.grid.width );                    
                }
            }

Here is the commit:

https://github.com/tonytomov/jqGrid/commit/a2572bd35a1fe195f8c4d2223d67a1831b96cdce

15/06/2011
20:54
Avatar
dlandis
Member
Members
Forum Posts: 5
Member Since:
02/07/2010
sp_UserOfflineSmall Offline

OK I changed my configuration so now I am using autowidth: true and now 4.1.0 works fine.

Maybe the problem was that I was not setting width or autowidth in my grid setup. That is just a guess.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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