Permalink
Browse files

Better solution for showHideCol and shrinkToFit false. Also the code …

…moved to setGridWidth.
  • Loading branch information...
1 parent 411b06f commit 8db080b35b56a5fec74058d9dc1c8b8bcadfc03f @tonytomov committed Jun 1, 2011
Showing with 7 additions and 9 deletions.
  1. +7 −9 js/grid.base.js
View
@@ -2830,14 +2830,8 @@ $.jgrid.extend({
});
if(fndh===true) {
if($t.p.shrinkToFit === false) {
- $('table:first',$t.grid.bDiv).css("width",$t.p.tblwidth+"px");
- $('table:first',$t.grid.hDiv).css("width",$t.p.tblwidth+"px");
- $t.grid.hDiv.scrollLeft = $t.grid.bDiv.scrollLeft;
- if($t.p.footerrow) {
- $('table:first',$t.grid.sDiv).css("width",$t.p.tblwidth+"px");
- }
- }
- else if($t.grid.width!==$t.p.tblwidth) {
+ $($t).jqGrid("setGridWidth",$t.grid.width );
+ } else if($t.grid.width!==$t.p.tblwidth) {
$($t).jqGrid("setGridWidth",$t.p.tblwidth );
}
}
@@ -2976,11 +2970,15 @@ $.jgrid.extend({
$t.grid.headers[lvc].width = cw;
$t.grid.headers[lvc].el.style.width=cw+"px";
if(cle) { $t.grid.cols[lvc].style.width = cw+"px"; }
+ if($t.p.footerrow) {
+ $t.grid.footers[lvc].style.width = cw+"px";
+ }
+ }
+ if($t.p.tblwidth) {
$('table:first',$t.grid.bDiv).css("width",$t.p.tblwidth+"px");
$('table:first',$t.grid.hDiv).css("width",$t.p.tblwidth+"px");
$t.grid.hDiv.scrollLeft = $t.grid.bDiv.scrollLeft;
if($t.p.footerrow) {
- $t.grid.footers[lvc].style.width = cw+"px";
$('table:first',$t.grid.sDiv).css("width",$t.p.tblwidth+"px");
}
}

0 comments on commit 8db080b

Please sign in to comment.