Forum
20:23
02/07/2010
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($t.grid.width!==$t.p.tblwidth) {
$($t).jqGrid("setGridWidth",$t.p.shrinkToFit===true?$t.grid.width:$t.p.tblwidth,true);
}
}
4.1.0:
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($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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66